aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-03-17 17:04:28 +0000
committerUlrich Drepper <drepper@redhat.com>2007-03-17 17:04:28 +0000
commitb037a293a48718af30d706c2e18c929d0e69a621 (patch)
treec92ad78668ac60e155f6d3cd18a7d005e9f4a457
parent63375de01e89283a60c045591c573cf2f51ee368 (diff)
downloadglibc-b037a293a48718af30d706c2e18c929d0e69a621.tar.xz
glibc-b037a293a48718af30d706c2e18c929d0e69a621.zip
* configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline.
* config.make.in (gnu89-inline-CFLAGS): New variable. * Makeconfig (CFLAGS): Use $(gnu89-inline-CFLAGS) together with -std=gnu99. * misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Define. * argp/argp.h: Use it. * bits/mathinline.h: Likewise. * bits/sigset.h: Likewise. * bits/string.h: Likewise. * ctype/ctype.h: Likewise. * hurd/hurd.h: Likewise. * hurd/hurd/fd.h: Likewise. * hurd/hurd/port.h: Likewise. * hurd/hurd/signal.h: Likewise. * hurd/hurd/threadvar.h: Likewise. * hurd/hurd/userlink.h: Likewise. * io/sys/stat.h: Likewise. * libio/bits/stdio.h: Likewise. * libio/bits/stdio2.h: Likewise. * mach/lock-intern.h: Likewise. * mach/mach/mig_support.h: Likewise. * math/bits/cmathcalls.h: Likewise. * posix/bits/unistd.h: Likewise. * socket/bits/socket2.h: Likewise. * stdlib/bits/stdlib.h: Likewise. * stdlib/stdlib.h: Likewise. * string/argz.h: Likewise. * string/bits/string2.h: Likewise. * string/bits/string3.h: Likewise. * sysdeps/alpha/fpu/bits/mathinline.h: Likewise. * sysdeps/generic/inttypes.h: Likewise. * sysdeps/generic/machine-lock.h: Likewise. * sysdeps/generic/machine-sp.h: Likewise. * sysdeps/i386/fpu/bits/mathinline.h: Likewise. * sysdeps/i386/i486/bits/string.h: Likewise. * sysdeps/ia64/fpu/bits/mathinline.h: Likewise. * sysdeps/mach/alpha/machine-lock.h: Likewise. * sysdeps/mach/alpha/machine-sp.h: Likewise. * sysdeps/mach/i386/machine-lock.h: Likewise. * sysdeps/mach/powerpc/machine-lock.h: Likewise. * sysdeps/mach/powerpc/machine-sp.h: Likewise. * sysdeps/powerpc/fpu/bits/mathinline.h: Likewise. * sysdeps/s390/bits/string.h: Likewise. * sysdeps/s390/fpu/bits/mathinline.h: Likewise. * sysdeps/sparc/fpu/bits/mathinline.h: Likewise. * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/sys/sysmacros.h: Likewise. * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise. * wcsmbs/bits/wchar2.h: Likewise. * wcsmbs/wchar.h: Likewise. * stdlib/gmp.h: Likewise. Include <features.h> to get __extern_inline definition. * locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is NULL.
-rw-r--r--ChangeLog60
-rw-r--r--Makeconfig4
-rw-r--r--argp/argp.h5
-rw-r--r--bits/mathinline.h2
-rw-r--r--bits/sigset.h5
-rw-r--r--bits/string.h2
-rw-r--r--config.make.in1
-rw-r--r--configure.in24
-rw-r--r--ctype/ctype.h6
-rw-r--r--hurd/hurd.h5
-rw-r--r--hurd/hurd/fd.h4
-rw-r--r--hurd/hurd/port.h5
-rw-r--r--hurd/hurd/signal.h4
-rw-r--r--hurd/hurd/threadvar.h4
-rw-r--r--hurd/hurd/userlink.h4
-rw-r--r--io/sys/stat.h23
-rw-r--r--libio/bits/stdio.h4
-rw-r--r--libio/bits/stdio2.h8
-rw-r--r--locale/programs/ld-ctype.c5
-rw-r--r--mach/lock-intern.h4
-rw-r--r--mach/mach/mig_support.h6
-rw-r--r--math/bits/cmathcalls.h8
-rw-r--r--misc/sys/cdefs.h13
-rw-r--r--nptl/sysdeps/pthread/bits/libc-lock.h2
-rw-r--r--nptl/sysdeps/pthread/pthread.h7
-rw-r--r--posix/bits/unistd.h30
-rw-r--r--socket/bits/socket2.h6
-rw-r--r--stdlib/bits/stdlib.h12
-rw-r--r--stdlib/gmp.h6
-rw-r--r--stdlib/stdlib.h28
-rw-r--r--string/argz.h6
-rw-r--r--string/bits/string2.h4
-rw-r--r--string/bits/string3.h4
-rw-r--r--sysdeps/alpha/fpu/bits/mathinline.h2
-rw-r--r--sysdeps/generic/inttypes.h18
-rw-r--r--sysdeps/generic/machine-lock.h4
-rw-r--r--sysdeps/generic/machine-sp.h4
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/i386/i486/bits/string.h4
-rw-r--r--sysdeps/ia64/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/mach/alpha/machine-lock.h4
-rw-r--r--sysdeps/mach/alpha/machine-sp.h4
-rw-r--r--sysdeps/mach/i386/machine-lock.h4
-rw-r--r--sysdeps/mach/powerpc/machine-lock.h4
-rw-r--r--sysdeps/mach/powerpc/machine-sp.h4
-rw-r--r--sysdeps/powerpc/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/s390/bits/string.h4
-rw-r--r--sysdeps/s390/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/sparc/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/socket.h4
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigset.h5
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h5
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h15
-rw-r--r--sysdeps/x86_64/fpu/bits/mathinline.h4
-rw-r--r--wcsmbs/bits/wchar2.h36
-rw-r--r--wcsmbs/wchar.h20
56 files changed, 293 insertions, 183 deletions
diff --git a/ChangeLog b/ChangeLog
index 6824b72032..c2ee48ddff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,65 @@
+2007-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline.
+ * config.make.in (gnu89-inline-CFLAGS): New variable.
+ * Makeconfig (CFLAGS): Use $(gnu89-inline-CFLAGS) together with
+ -std=gnu99.
+ * misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Define.
+ * argp/argp.h: Use it.
+ * bits/mathinline.h: Likewise.
+ * bits/sigset.h: Likewise.
+ * bits/string.h: Likewise.
+ * ctype/ctype.h: Likewise.
+ * hurd/hurd.h: Likewise.
+ * hurd/hurd/fd.h: Likewise.
+ * hurd/hurd/port.h: Likewise.
+ * hurd/hurd/signal.h: Likewise.
+ * hurd/hurd/threadvar.h: Likewise.
+ * hurd/hurd/userlink.h: Likewise.
+ * io/sys/stat.h: Likewise.
+ * libio/bits/stdio.h: Likewise.
+ * libio/bits/stdio2.h: Likewise.
+ * mach/lock-intern.h: Likewise.
+ * mach/mach/mig_support.h: Likewise.
+ * math/bits/cmathcalls.h: Likewise.
+ * posix/bits/unistd.h: Likewise.
+ * socket/bits/socket2.h: Likewise.
+ * stdlib/bits/stdlib.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+ * string/argz.h: Likewise.
+ * string/bits/string2.h: Likewise.
+ * string/bits/string3.h: Likewise.
+ * sysdeps/alpha/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/generic/inttypes.h: Likewise.
+ * sysdeps/generic/machine-lock.h: Likewise.
+ * sysdeps/generic/machine-sp.h: Likewise.
+ * sysdeps/i386/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/i386/i486/bits/string.h: Likewise.
+ * sysdeps/ia64/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/mach/alpha/machine-lock.h: Likewise.
+ * sysdeps/mach/alpha/machine-sp.h: Likewise.
+ * sysdeps/mach/i386/machine-lock.h: Likewise.
+ * sysdeps/mach/powerpc/machine-lock.h: Likewise.
+ * sysdeps/mach/powerpc/machine-sp.h: Likewise.
+ * sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/s390/bits/string.h: Likewise.
+ * sysdeps/s390/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/sparc/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
+ * sysdeps/unix/sysv/linux/sys/sysmacros.h: Likewise.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
+ * wcsmbs/bits/wchar2.h: Likewise.
+ * wcsmbs/wchar.h: Likewise.
+ * stdlib/gmp.h: Likewise. Include <features.h> to get
+ __extern_inline definition.
+
2007-03-15 Jakub Jelinek <jakub@redhat.com>
+ * locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is
+ NULL.
+
[BZ #3919]
* math/libm-test.inc (log_test): Test -Inf and NaN.
(log10_test, log1p_test, log2_test): Test -Inf.
diff --git a/Makeconfig b/Makeconfig
index 349f94d9ac..049e4ca83a 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2003,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright (C) 1991-2003,2004,2005,2006,2007 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -672,7 +672,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
$(foreach lib,$(libof-$(basename $(@F))) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
-override CFLAGS = -std=gnu99 \
+override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
$(CFLAGS-$(@F))
diff --git a/argp/argp.h b/argp/argp.h
index 3a5cb01fd8..baf3afd826 100644
--- a/argp/argp.h
+++ b/argp/argp.h
@@ -1,5 +1,6 @@
/* Hierarchial argument parsing, layered over getopt.
- Copyright (C) 1995-1999,2003,2004,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -558,7 +559,7 @@ extern void *__argp_input (__const struct argp *__restrict __argp,
# endif
# ifndef ARGP_EI
-# define ARGP_EI extern __inline__
+# define ARGP_EI __extern_inline
# endif
ARGP_EI void
diff --git a/bits/mathinline.h b/bits/mathinline.h
index 5498af6b63..02ec21b438 100644
--- a/bits/mathinline.h
+++ b/bits/mathinline.h
@@ -1,6 +1,6 @@
/* This file should provide inline versions of math functions.
- Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
+ Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'.
This file should define __MATH_INLINES if functions are actually defined as
inlines. */
diff --git a/bits/sigset.h b/bits/sigset.h
index 5fc8692df0..d6f9311e71 100644
--- a/bits/sigset.h
+++ b/bits/sigset.h
@@ -1,5 +1,6 @@
/* __sig_atomic_t, __sigset_t, and related definitions. Generic/BSD version.
- Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +39,7 @@ typedef unsigned long int __sigset_t;
#define _SIGSET_H_fns 1
#ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
#endif
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
diff --git a/bits/string.h b/bits/string.h
index ad68b038b6..f8630d2c52 100644
--- a/bits/string.h
+++ b/bits/string.h
@@ -1,6 +1,6 @@
/* This file should provide inline versions of string functions.
- Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
+ Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'.
This file should define __STRING_INLINES if functions are actually defined
as inlines. */
diff --git a/config.make.in b/config.make.in
index 7aa9c1c12d..35597f808d 100644
--- a/config.make.in
+++ b/config.make.in
@@ -53,6 +53,7 @@ have-cpp-asm-debuginfo = @libc_cv_cpp_asm_debuginfo@
enable-check-abi = @enable_check_abi@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
+gnu89-inline-CFLAGS = @libc_cv_gnu89_inline@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
have-libaudit = @have_libaudit@
diff --git a/configure.in b/configure.in
index 71ceb04b33..baf37598b2 100644
--- a/configure.in
+++ b/configure.in
@@ -1641,6 +1641,30 @@ fi
rm -f conftest*])
AC_SUBST(libc_cv_ssp)
+AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
+cat > conftest.c <<EOF
+int foo;
+#ifdef __GNUC_GNU_INLINE__
+main () { return 0;}
+#else
+#error
+#endif
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -std=gnu99 -fgnu89-inline
+ -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_gnu89_inline=yes
+else
+ libc_cv_gnu89_inline=no
+fi
+rm -f conftest*])
+if test $libc_cv_gnu89_inline = yes; then
+ libc_cv_gnu89_inline=-fgnu89-inline
+else
+ libc_cv_gnu89_inline=
+fi
+AC_SUBST(libc_cv_gnu89_inline)
+
if test $elf != yes; then
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
[AC_TRY_COMPILE(, [asm (".section .init");
diff --git a/ctype/ctype.h b/ctype/ctype.h
index e08545359d..9ae7fb6088 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -187,13 +187,13 @@ __exctype (_tolower);
# endif
# ifdef __USE_EXTERN_INLINES
-extern __inline int
+__extern_inline int
__NTH (tolower (int __c))
{
return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
}
-extern __inline int
+__extern_inline int
__NTH (toupper (int __c))
{
return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
diff --git a/hurd/hurd.h b/hurd/hurd.h
index 0dc9f2158b..642ea43b7b 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,94,95,96,97,98,99,2001,02 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,96,97,98,99,2001,2002,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The