From 4360eafdd20769fa9d42c075853271debd06f7d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Jun 1999 09:58:37 +0000 Subject: [PATCH] Update. 1999-06-18 Zack Weinberg * include/features.h: Define new macros __GNUC_PREREQ and __GLIBC_PREREQ which can be used to test the version of gcc and glibc respectively. * assert/assert.h: Use __GNUC_PREREQ. * intl/libintl.h: Likewise. * math/complex.h: Likewise. * math/tgmath.h: Likewise. * misc/sys/cdefs.h: Likewise. * posix/sys/types.h: Likewise. * socket/sys/socket.h: Likewise. * string/bits/string2.h: Likewise. * sysdeps/alpha/fpu/bits/mathinline.h: Likewise. * sysdeps/i386/fpu/bits/mathinline.h: Likewise. 1999-06-18 Zack Weinberg * include/libintl.h: Declare _libc_intl_domainname here. Define _ and N_ here. * include/libc-symbols.h: Don't include . Don't define _ and N_. Don't declare _libc_intl_domainname. * Makeconfig (CPPFLAGS): Use -imacros to read libc-symbols.h. * db2/config.h: Don't include sys/stat.h or define HAVE_ST_BLKSIZE here... * db2/compat.h: ...do it here. * linuxthreads/internals.h: Include bits/libc-tsd.h after all other headers. * linuxthreads/no-tsd.c: Include sys/cdefs.h for __P. * iconv/iconv.c: Include stddef.h for NULL. * malloc/malloc.h: Include features.h. * sysdeps/generic/morecore.c: Use __malloc_ptr_t not __ptr_t. * sysdeps/unix/make_errlist.c: Write an "#include " into the generated file. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Rebuilt. * assert/assert-perr.c: Include libintl.h. * assert/assert.c: Likewise. * elf/dl-open.c: Likewise. * elf/dlsym.c: Likewise. * elf/dlvsym.c: Likewise. * iconv/iconv_prog.c: Likewise. * inet/rcmd.c: Likewise. * inet/ruserpass.c: Likewise. * locale/programs/charset.c: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-time.c: Likewise. * locale/programs/locfile.c: Likewise. * locale/programs/repertoire.c: Likewise. * login/programs/database.c: Likewise. * login/programs/request.c: Likewise. * malloc/mcheck.c: Likewise. * misc/error.c: Likewise. * nis/nis_call.c: Likewise. * nis/nis_callback.c: Likewise. * nis/nis_error.c: Likewise. * nis/nis_local_names.c: Likewise. * nis/nis_print.c: Likewise. * nis/nis_print_group_entry.c: Likewise. * nis/ypclnt.c: Likewise. * nis/nss_nisplus/nisplus-publickey.c: Likewise. * nscd/cache.c: Likewise. * nscd/connections.c: Likewise. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/nscd_conf.c: Likewise. * nscd/nscd_stat.c: Likewise. * nscd/pwdcache.c: Likewise. * posix/id.c: Likewise. * resolv/herror.c: Likewise. * stdio-common/psignal.c: Likewise. * string/strsignal.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_raw.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/get_myaddr.c: Likewise. * sunrpc/pm_getmaps.c: Likewise. * sunrpc/pmap_clnt.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/rpc_main.c: Likewise. * sunrpc/rpc_scan.c: Likewise. * sunrpc/svc_run.c: Likewise. * sunrpc/svc_simple.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/svc_unix.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * sysdeps/mach/hurd/mips/dl-machine.c: Likewise. * sysdeps/posix/gai_strerror.c: Likewise. * sysdeps/unix/siglist.c: Likewise. * sysdeps/unix/sysv/linux/siglist.c: Likewise. * sysdeps/unix/sysv/linux/arm/siglist.c: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c: Likewise. * timezone/zic.c: Likewise. --- ChangeLog | 108 ++++++++++++++++++ Makeconfig | 2 +- assert/assert-perr.c | 1 + assert/assert.c | 1 + assert/assert.h | 8 +- db2/compat.h | 6 + db2/config.h | 6 - elf/dl-open.c | 1 + elf/dlsym.c | 1 + elf/dlvsym.c | 1 + iconv/iconv.c | 1 + iconv/iconv_prog.c | 1 + include/features.h | 14 +++ include/libc-symbols.h | 27 ----- include/libintl.h | 16 +++ inet/rcmd.c | 1 + inet/ruserpass.c | 1 + intl/libintl.h | 2 +- linuxthreads/internals.h | 2 +- linuxthreads/no-tsd.c | 1 + locale/programs/charset.c | 1 + locale/programs/ld-collate.c | 1 + locale/programs/ld-ctype.c | 1 + locale/programs/ld-messages.c | 1 + locale/programs/ld-monetary.c | 1 + locale/programs/ld-numeric.c | 1 + locale/programs/ld-time.c | 1 + locale/programs/locfile.c | 1 + locale/programs/repertoire.c | 1 + login/programs/database.c | 1 + login/programs/request.c | 1 + malloc/malloc.h | 2 + malloc/mcheck.c | 1 + math/complex.h | 2 +- math/tgmath.h | 2 +- misc/error.c | 1 + misc/sys/cdefs.h | 12 +- nis/nis_call.c | 1 + nis/nis_callback.c | 1 + nis/nis_error.c | 1 + nis/nis_local_names.c | 1 + nis/nis_print.c | 1 + nis/nis_print_group_entry.c | 1 + nis/nss_nisplus/nisplus-publickey.c | 1 + nis/ypclnt.c | 1 + nscd/cache.c | 1 + nscd/connections.c | 1 + nscd/grpcache.c | 1 + nscd/hstcache.c | 1 + nscd/nscd_conf.c | 1 + nscd/nscd_stat.c | 1 + nscd/pwdcache.c | 1 + posix/id.c | 1 + posix/sys/types.h | 2 +- resolv/herror.c | 1 + socket/sys/socket.h | 3 +- stdio-common/psignal.c | 1 + string/bits/string2.h | 6 +- string/strsignal.c | 1 + sunrpc/auth_unix.c | 1 + sunrpc/clnt_perr.c | 1 + sunrpc/clnt_raw.c | 1 + sunrpc/clnt_tcp.c | 1 + sunrpc/clnt_udp.c | 1 + sunrpc/clnt_unix.c | 1 + sunrpc/get_myaddr.c | 1 + sunrpc/pm_getmaps.c | 1 + sunrpc/pmap_clnt.c | 1 + sunrpc/pmap_rmt.c | 1 + sunrpc/rpc_main.c | 1 + sunrpc/rpc_scan.c | 1 + sunrpc/svc_run.c | 1 + sunrpc/svc_simple.c | 1 + sunrpc/svc_tcp.c | 1 + sunrpc/svc_udp.c | 1 + sunrpc/svc_unix.c | 1 + sunrpc/xdr_rec.c | 1 + sunrpc/xdr_ref.c | 1 + sysdeps/alpha/fpu/bits/mathinline.h | 2 +- sysdeps/generic/morecore.c | 8 +- sysdeps/gnu/errlist.awk | 1 + sysdeps/gnu/errlist.c | 1 + sysdeps/i386/fpu/bits/mathinline.h | 4 +- sysdeps/mach/hurd/mips/dl-machine.c | 1 + sysdeps/posix/gai_strerror.c | 1 + sysdeps/unix/make_errlist.c | 1 + sysdeps/unix/siglist.c | 1 + sysdeps/unix/sysv/linux/arm/siglist.c | 1 + sysdeps/unix/sysv/linux/siglist.c | 1 + .../unix/sysv/sysv4/solaris2/sparc/errlist.c | 1 + timezone/zic.c | 2 + 91 files changed, 240 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2367f18cbbd..5cb83a8409c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,111 @@ +1999-06-18 Zack Weinberg + + * include/features.h: Define new macros __GNUC_PREREQ and + __GLIBC_PREREQ which can be used to test the version of gcc + and glibc respectively. + + * assert/assert.h: Use __GNUC_PREREQ. + * intl/libintl.h: Likewise. + * math/complex.h: Likewise. + * math/tgmath.h: Likewise. + * misc/sys/cdefs.h: Likewise. + * posix/sys/types.h: Likewise. + * socket/sys/socket.h: Likewise. + * string/bits/string2.h: Likewise. + * sysdeps/alpha/fpu/bits/mathinline.h: Likewise. + * sysdeps/i386/fpu/bits/mathinline.h: Likewise. + +1999-06-18 Zack Weinberg + + * include/libintl.h: Declare _libc_intl_domainname here. + Define _ and N_ here. + * include/libc-symbols.h: Don't include . Don't + define _ and N_. Don't declare _libc_intl_domainname. + * Makeconfig (CPPFLAGS): Use -imacros to read libc-symbols.h. + + * db2/config.h: Don't include sys/stat.h or define + HAVE_ST_BLKSIZE here... + * db2/compat.h: ...do it here. + + * linuxthreads/internals.h: Include bits/libc-tsd.h after all + other headers. + * linuxthreads/no-tsd.c: Include sys/cdefs.h for __P. + * iconv/iconv.c: Include stddef.h for NULL. + * malloc/malloc.h: Include features.h. + * sysdeps/generic/morecore.c: Use __malloc_ptr_t not __ptr_t. + + * sysdeps/unix/make_errlist.c: Write an "#include " + into the generated file. + * sysdeps/gnu/errlist.awk: Likewise. + * sysdeps/gnu/errlist.c: Rebuilt. + + * assert/assert-perr.c: Include libintl.h. + * assert/assert.c: Likewise. + * elf/dl-open.c: Likewise. + * elf/dlsym.c: Likewise. + * elf/dlvsym.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * inet/rcmd.c: Likewise. + * inet/ruserpass.c: Likewise. + * locale/programs/charset.c: Likewise. + * locale/programs/ld-collate.c: Likewise. + * locale/programs/ld-ctype.c: Likewise. + * locale/programs/ld-messages.c: Likewise. + * locale/programs/ld-monetary.c: Likewise. + * locale/programs/ld-numeric.c: Likewise. + * locale/programs/ld-time.c: Likewise. + * locale/programs/locfile.c: Likewise. + * locale/programs/repertoire.c: Likewise. + * login/programs/database.c: Likewise. + * login/programs/request.c: Likewise. + * malloc/mcheck.c: Likewise. + * misc/error.c: Likewise. + * nis/nis_call.c: Likewise. + * nis/nis_callback.c: Likewise. + * nis/nis_error.c: Likewise. + * nis/nis_local_names.c: Likewise. + * nis/nis_print.c: Likewise. + * nis/nis_print_group_entry.c: Likewise. + * nis/ypclnt.c: Likewise. + * nis/nss_nisplus/nisplus-publickey.c: Likewise. + * nscd/cache.c: Likewise. + * nscd/connections.c: Likewise. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/nscd_conf.c: Likewise. + * nscd/nscd_stat.c: Likewise. + * nscd/pwdcache.c: Likewise. + * posix/id.c: Likewise. + * resolv/herror.c: Likewise. + * stdio-common/psignal.c: Likewise. + * string/strsignal.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_raw.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/get_myaddr.c: Likewise. + * sunrpc/pm_getmaps.c: Likewise. + * sunrpc/pmap_clnt.c: Likewise. + * sunrpc/pmap_rmt.c: Likewise. + * sunrpc/rpc_main.c: Likewise. + * sunrpc/rpc_scan.c: Likewise. + * sunrpc/svc_run.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sysdeps/mach/hurd/mips/dl-machine.c: Likewise. + * sysdeps/posix/gai_strerror.c: Likewise. + * sysdeps/unix/siglist.c: Likewise. + * sysdeps/unix/sysv/linux/siglist.c: Likewise. + * sysdeps/unix/sysv/linux/arm/siglist.c: Likewise. + * sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c: Likewise. + * timezone/zic.c: Likewise. + 1999-06-18 H.J. Lu * localedata/Makefile (charmaps): Exclude SCCS. diff --git a/Makeconfig b/Makeconfig index 6ae27e9dc6b..f4f6508f1c5 100644 --- a/Makeconfig +++ b/Makeconfig @@ -570,7 +570,7 @@ libio-include = -I$(..)libio # These are the variables that the implicit compilation rules use. CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \ - -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \ + -imacros $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \ $(CPPFLAGS-$(suffix $@)) $(CPPFLAGS-$( #include #include +#include extern const char *__assert_program_name; /* In assert.c. */ diff --git a/assert/assert.c b/assert/assert.c index f1144101f8d..e957a44f977 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -20,6 +20,7 @@ #include #include #include +#include const char *__assert_program_name; diff --git a/assert/assert.h b/assert/assert.h index bbff9417f46..386e80c3b17 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -87,17 +87,11 @@ __END_DECLS /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. -# define __ASSERT_FUNCTION __PRETTY_FUNCTION__ This is broken in G++ before version 2.6. C9x has a similar variable called __func__, but prefer the GCC one since it demangles C++ function names. */ -# ifdef __GNUC__ -# if __GNUC__ > 2 || (__GNUC__ == 2 \ - && __GNUC_MINOR__ >= (defined __cplusplus ? 6 : 4)) +# if __GNUC_PREREQ (2, (defined __cplusplus ? 6 : 4)) # define __ASSERT_FUNCTION __PRETTY_FUNCTION__ -# else -# define __ASSERT_FUNCTION ((__const char *) 0) -# endif # else # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __ASSERT_FUNCTION __func__ diff --git a/db2/compat.h b/db2/compat.h index 86909aeb130..51008afcf07 100644 --- a/db2/compat.h +++ b/db2/compat.h @@ -3,6 +3,12 @@ #include #include +#include +#ifdef _STATBUF_ST_BLKSIZE +# define HAVE_ST_BLKSIZE +#endif + + #ifndef EFTYPE # define EFTYPE EINVAL #endif diff --git a/db2/config.h b/db2/config.h index e5e105830e1..6f09795e3c4 100644 --- a/db2/config.h +++ b/db2/config.h @@ -2,16 +2,10 @@ /* config.h.in. Generated automatically from configure.in by autoheader. */ /* ...but edited by hand to be used in GNU libc. */ -#include /* To get _STATBUF_ST_BLKSIZE. */ /* Define to empty if the keyword does not work. */ /* #undef const */ -/* Define if your struct stat has st_blksize. */ -#ifdef _STATBUF_ST_BLKSIZE -# define HAVE_ST_BLKSIZE 1 -#endif - /* Define to `int' if doesn't define. */ /* #undef mode_t */ diff --git a/elf/dl-open.c b/elf/dl-open.c index b6c79b41ef8..149badd6186 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -22,6 +22,7 @@ #include #include #include +#include #include /* Check whether MAP_COPY is defined. */ #include #include diff --git a/elf/dlsym.c b/elf/dlsym.c index 5753f54d6ea..6627ffc6c23 100644 --- a/elf/dlsym.c +++ b/elf/dlsym.c @@ -20,6 +20,7 @@ #include #include #include +#include #include struct dlsym_args diff --git a/elf/dlvsym.c b/elf/dlvsym.c index b100a2ecbfa..68e099b4f97 100644 --- a/elf/dlvsym.c +++ b/elf/dlvsym.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/iconv/iconv.c b/iconv/iconv.c index 85a39e3fa5d..ee16d3b0914 100644 --- a/iconv/iconv.c +++ b/iconv/iconv.c @@ -19,6 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include /* for NULL */ #include #include diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index 78fa6234f49..c91c76f34f6 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef _POSIX_MAPPED_FILES # include #endif diff --git a/include/features.h b/include/features.h index bc105104155..de2b143b600 100644 --- a/include/features.h +++ b/include/features.h @@ -244,9 +244,23 @@ #define __GLIBC__ 2 #define __GLIBC_MINOR__ 2 +/* Convenience macros to test the versions of glibc and gcc. + Use them like this: + #if __GNUC_PREREQ (2,8) + ... code requiring gcc 2.8 or later ... + #endif + Note - they won't work for gcc1 or glibc1, since the _MINOR macros + were not defined then. */ +#define __GNUC_PREREQ(maj,min) (defined __GNUC__ && defined __GNUC_MINOR__ \ + && ((__GNUC__ << 16) + __GNUC_MINOR__) >= ((maj<<16) + min)) +#define __GLIBC_PREREQ(maj,min) (defined __GLIBC__ && defined __GLIBC_MINOR__ \ + && ((__GLIBC__ << 16) + __GLIBC_MINOR__) >= ((maj<<16) + min)) + /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ +#ifndef _SYS_CDEFS_H # include +#endif /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 5d15791fdac..dd573b32a8f 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -52,34 +52,7 @@ #define _REENTRANT 1 #include -/* - -*/ - -#ifndef __ASSEMBLER__ -/* Define the macros `_' and `N_' for conveniently marking translatable - strings in the libc source code. */ - -# define N_(msgid) msgid - -# include -extern const char _libc_intl_domainname[]; - -# ifdef dgettext -/* This is defined as an optimizing macro, so use it. */ -# define _(msgid) dgettext (_libc_intl_domainname, (msgid)) -# else -/* Be sure to use only the __ name when `dgettext' is a plain function - instead of an optimizing macro. */ -# define _(msgid) __dgettext (_libc_intl_domainname, (msgid)) -# endif - -#endif - -/* - -*/ /* The symbols in all the user (non-_) macros are C symbols. HAVE_GNU_LD without HAVE_ELF implies a.out. */ diff --git a/include/libintl.h b/include/libintl.h index 3763b04c5f2..a772853c02d 100644 --- a/include/libintl.h +++ b/include/libintl.h @@ -6,4 +6,20 @@ extern char *__gettext __P ((__const char *__msgid)); extern char *__textdomain __P ((__const char *__domainname)); extern char *__bindtextdomain __P ((__const char *__domainname, __const char *__dirname)); +extern const char _libc_intl_domainname[]; + +/* Define the macros `_' and `N_' for conveniently marking translatable + strings in the libc source code. */ + +# define N_(msgid) msgid + +# ifdef dgettext +/* This is defined as an optimizing macro, so use it. */ +# define _(msgid) dgettext (_libc_intl_domainname, (msgid)) +# else +/* Be sure to use only the __ name when `dgettext' is a plain function + instead of an optimizing macro. */ +# define _(msgid) __dgettext (_libc_intl_domainname, (msgid)) +# endif + #endif diff --git a/inet/rcmd.c b/inet/rcmd.c index 1a38de555dd..6d196b73119 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #include #include #include +#include int __ivaliduser __P ((FILE *, u_int32_t, const char *, const char *)); diff --git a/inet/ruserpass.c b/inet/ruserpass.c index 582eec66133..70bfdd4c8dd 100644 --- a/inet/ruserpass.c +++ b/inet/ruserpass.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)ruserpass.c 8.3 (Berkeley) 4/2/94"; #include #include #include +#include /* #include "ftp_var.h" */ diff --git a/intl/libintl.h b/intl/libintl.h index 0a0f898ed79..1d355189953 100644 --- a/intl/libintl.h +++ b/intl/libintl.h @@ -82,7 +82,7 @@ extern char *bindtextdomain __P ((__const char *__domainname, # define dgettext(domainname, msgid) \ dcgettext (domainname, msgid, LC_MESSAGES) -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC_PREREQ (2,7) /* Variable defined in loadmsgcat.c which gets incremented every time a new catalog is loaded. */ extern int _nl_msg_cat_cntr; diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index cfd72cda728..db84707312d 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -16,12 +16,12 @@ /* Includes */ -#include /* for _LIBC_TSD_KEY_N */ #include #include #include #include #include +#include /* for _LIBC_TSD_KEY_N */ #include "pt-machine.h" diff --git a/linuxthreads/no-tsd.c b/linuxthreads/no-tsd.c index ef79cb8320d..f852ce01a79 100644 --- a/linuxthreads/no-tsd.c +++ b/linuxthreads/no-tsd.c @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include /* for __P */ #include /* This file provides uinitialized (common) definitions for the diff --git a/locale/programs/charset.c b/locale/programs/charset.c index 767fafb93a0..2222c9f48a7 100644 --- a/locale/programs/charset.c +++ b/locale/programs/charset.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "error.h" #include "charset.h" diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index c16771638c1..265bfd0af13 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "localeinfo.h" #include "locales.h" diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index 6ce48b79965..714a71898bb 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "locales.h" #include "localeinfo.h" diff --git a/locale/programs/ld-messages.c b/locale/programs/ld-messages.c index 288979f4542..69e411c8d62 100644 --- a/locale/programs/ld-messages.c +++ b/locale/programs/ld-messages.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #ifdef HAVE_REGEX diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c index a74486ad60c..b903d630aa2 100644 --- a/locale/programs/ld-monetary.c +++ b/locale/programs/ld-monetary.c @@ -25,6 +25,7 @@ #include #include #include +#include /* Undefine following line in production version. */ diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c index 4042d6eba6c..0e61481c73c 100644 --- a/locale/programs/ld-numeric.c +++ b/locale/programs/ld-numeric.c @@ -24,6 +24,7 @@ #include #include #include +#include /* Undefine following line in production version. */ /* #define NDEBUG 1 */ diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index bee0b0ea645..c63d897f077 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -23,6 +23,7 @@ #include #include +#include /* Undefine following line in production version. */ /* #define NDEBUG 1 */ diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index a90168ac814..79d6ab13e6d 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c index e7040a0e2c5..a03021fdbf1 100644 --- a/locale/programs/repertoire.c +++ b/locale/programs/repertoire.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "linereader.h" #include "charset.h" diff --git a/login/programs/database.c b/login/programs/database.c index 7044cd8d87a..4267c111862 100644 --- a/login/programs/database.c +++ b/login/programs/database.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "utmpd-private.h" diff --git a/login/programs/request.c b/login/programs/request.c index 889ce0cba9f..33f5524c326 100644 --- a/login/programs/request.c +++ b/login/programs/request.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "utmpd.h" #include "utmpd-private.h" diff --git a/malloc/malloc.h b/malloc/malloc.h index eeb33a29492..c453d728e6a 100644 --- a/malloc/malloc.h +++ b/malloc/malloc.h @@ -20,6 +20,8 @@ #ifndef _MALLOC_H #define _MALLOC_H 1 +#include + /* `ptmalloc', a malloc implementation for multiple threads without lock contention, by Wolfram Gloger . diff --git a/malloc/mcheck.c b/malloc/mcheck.c index 53575a7677c..85258e9dd0e 100644 --- a/malloc/mcheck.c +++ b/malloc/mcheck.c @@ -25,6 +25,7 @@ # include # include # include +# include #endif /* Old hook values. */ diff --git a/math/complex.h b/math/complex.h index 7ed9890e129..82fae63163d 100644 --- a/math/complex.h +++ b/math/complex.h @@ -33,7 +33,7 @@ __BEGIN_DECLS /* We might need to add support for more compilers here. But once ISO C 9X is out hopefully all maintained compilers will provide the data types `float complex' and `double complex'. */ -#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2 +#if __GNUC_PREREQ (2, 7) # define _Complex __complex__ #endif diff --git a/math/tgmath.h b/math/tgmath.h index 1a6591e7999..449b498ab7b 100644 --- a/math/tgmath.h +++ b/math/tgmath.h @@ -34,7 +34,7 @@ do not try this for now and instead concentrate only on GNU CC. Once we have more information support for other compilers might follow. */ -#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7) +#if __GNUC_PREREQ (2, 7) /* We have two kinds of generic macros: to support functions which are only defined on real valued parameters and those which are defined diff --git a/misc/error.c b/misc/error.c index ca7f3b47b88..cb55c2f0d84 100644 --- a/misc/error.c +++ b/misc/error.c @@ -26,6 +26,7 @@ #endif #include +#include #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC # if __STDC__ diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 6d4bc62e14a..6a8b870e139 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -33,7 +33,7 @@ /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. */ -# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8) +# if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW @@ -42,6 +42,7 @@ /* This macro will be used for functions which might take C++ callback functions. */ # define __PMT(args) args + # define __DOTS , ... #else /* Not GCC. */ @@ -131,7 +132,6 @@ /* #elif __SOME_OTHER_COMPILER__ -# define __attribute__(xyz) # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ @@ -150,17 +150,13 @@ run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ -#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) - +#if !__GNUC_PREREQ (2,8) # define __extension__ /* Ignore */ - #endif /* __restrict is known in EGCS 1.2 and above. */ -#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 92) - +#if !__GNUC_PREREQ (2,92) # define __restrict /* Ignore */ - #endif #endif /* sys/cdefs.h */ diff --git a/nis/nis_call.c b/nis/nis_call.c index 73bd2d7de2b..0315ce3c40c 100644 --- a/nis/nis_call.c +++ b/nis/nis_call.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/nis/nis_callback.c b/nis/nis_callback.c index 6525484b459..57a15e5162b 100644 --- a/nis/nis_callback.c +++ b/nis/nis_callback.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/nis/nis_error.c b/nis/nis_error.c index f5fe0f631da..39d445380ba 100644 --- a/nis/nis_error.c +++ b/nis/nis_error.c @@ -20,6 +20,7 @@ #include #include #include +#include #include diff --git a/nis/nis_local_names.c b/nis/nis_local_names.c index 22601a46aa8..0d23778ba99 100644 --- a/nis/nis_local_names.c +++ b/nis/nis_local_names.c @@ -20,6 +20,7 @@ #include #include #include +#include #include nis_name diff --git a/nis/nis_print.c b/nis/nis_print.c index ded5f5aa678..ab5f6838bdd 100644 --- a/nis/nis_print.c +++ b/nis/nis_print.c @@ -19,6 +19,7 @@ #include #include +#include #include diff --git a/nis/nis_print_group_entry.c b/nis/nis_print_group_entry.c index d5cdda038ca..e1970dca487 100644 --- a/nis/nis_print_group_entry.c +++ b/nis/nis_print_group_entry.c @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include void diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c index a9a8e186e07..1620611fbc7 100644 --- a/nis/nss_nisplus/nisplus-publickey.c +++ b/nis/nss_nisplus/nisplus-publickey.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/nis/ypclnt.c b/nis/ypclnt.c index cfda29a668d..1dc9ca31263 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/nscd/cache.c b/nscd/cache.c index 0071c11524a..61fb7703c28 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/nscd/connections.c b/nscd/connections.c index 9d1b4d366ef..d40d9873238 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/nscd/grpcache.c b/nscd/grpcache.c index d8848f3e00d..62f4c573a60 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "nscd.h" #include "dbg_log.h" diff --git a/nscd/hstcache.c b/nscd/hstcache.c index 6fceecfc56e..292d9187e4f 100644 --- a/nscd/hstcache.c +++ b/nscd/hstcache.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "nscd.h" diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index d31e2bde3a7..010b905fe89 100644 --- a/nscd/nscd_conf.c +++ b/nscd/nscd_conf.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c index f9d21aeb01b..70c66e87fed 100644 --- a/nscd/nscd_stat.c +++ b/nscd/nscd_stat.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "nscd.h" #include "dbg_log.h" diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index a66cf4fe3d9..2c4e6c722f8 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "nscd.h" #include "dbg_log.h" diff --git a/posix/id.c b/posix/id.c index 6c602b21b4b..c0db14c9bd8 100644 --- a/posix/id.c +++ b/posix/id.c @@ -22,6 +22,7 @@ #include #include #include +#include #include diff --git a/posix/sys/types.h b/posix/sys/types.h index 8ba320006b8..362d547c083 100644 --- a/posix/sys/types.h +++ b/posix/sys/types.h @@ -132,7 +132,7 @@ typedef unsigned int uint; /* These size-specific names are used by some of the inet code. */ -#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +#if !__GNUC_PREREQ (2, 7) /* These types are defined by the ISO C 9x header . */ # ifndef __int8_t_defined diff --git a/resolv/herror.c b/resolv/herror.c index 53780cda720..8ba0ebef624 100644 --- a/resolv/herror.c +++ b/resolv/herror.c @@ -58,6 +58,7 @@ static char rcsid[] = "$Id$"; #include #include #include +#include #if defined(BSD) && (BSD >= 199103) # include # include diff --git a/socket/sys/socket.h b/socket/sys/socket.h index 7642e750262..0a5dc019014 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -61,8 +61,7 @@ enum uses with any of the listed types to be allowed without complaint. G++ 2.7 does not support transparent unions so there we want the old-style declaration, too. */ -#if (!defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus || \ - (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) +#if defined __cplusplus || !__GNUC_PREREQ (2, 7) # define __SOCKADDR_ARG struct sockaddr * # define __CONST_SOCKADDR_ARG __const struct sockaddr * #else diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c index 19a57539931..269f7e2f3da 100644 --- a/stdio-common/psignal.c +++ b/stdio-common/psignal.c @@ -18,6 +18,7 @@ #include #include +#include #ifndef HAVE_GNU_LD diff --git a/string/bits/string2.h b/string/bits/string2.h index fdfa32dc2c5..48903b3e818 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -167,9 +167,9 @@ __STRING2_COPY_TYPE (8); : memset (s, c, n))) # endif -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). */ -#if defined __GNUC__ \ - && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 90)) +/* GCC optimizes memset(s, 0, n) but not bzero(s, n). + The optimization is broken before EGCS 1.1. */ +#if __GNUC_PREREQ (2, 91) # define __bzero(s, n) __builtin_memset (s, '\0', n) # endif diff --git a/string/strsignal.c b/string/strsignal.c index 90480f5d4a3..1a13707e377 100644 --- a/string/strsignal.c +++ b/string/strsignal.c @@ -20,6 +20,7 @@ #include #include #include +#include #include diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index 82ef91a0de5..a03ce0219ab 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index ae6a1da7e09..7896499f82c 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -39,6 +39,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; */ #include #include +#include #include #include #include diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index 18ae2414ab7..8ed589c93dd 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -45,6 +45,7 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include #define MCALL_MSG_SIZE 24 diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 1d00c793317..9a35ec1c221 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -54,6 +54,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #include #include #include +#include #include #include #include diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 1d9f38651bb..eeac79c3e62 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -39,6 +39,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #include #include +#include #include #include #include diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 761ecafb05e..211fcd6f794 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c index 820c7b3109a..7a4bb8cb6fd 100644 --- a/sunrpc/get_myaddr.c +++ b/sunrpc/get_myaddr.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include #include #include /* Order of following two #includes reversed by roland@gnu */ diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c index 2812b3aead5..8f41a4568c5 100644 --- a/sunrpc/pm_getmaps.c +++ b/sunrpc/pm_getmaps.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include /* * Get a copy of the current port maps. diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c index 11e241dfcb0..05cfe2fa523 100644 --- a/sunrpc/pmap_clnt.c +++ b/sunrpc/pmap_clnt.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index f361ac3598c..bfc9cc8954c 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #include #include +#include #include #include #include diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c index aec153faaa8..cc3d2492467 100644 --- a/sunrpc/rpc_main.c +++ b/sunrpc/rpc_main.c @@ -42,6 +42,7 @@ const char main_rcsid[] = #include #include #include +#include #include #include #include diff --git a/sunrpc/rpc_scan.c b/sunrpc/rpc_scan.c index aa988052b16..daecc32d436 100644 --- a/sunrpc/rpc_scan.c +++ b/sunrpc/rpc_scan.c @@ -41,6 +41,7 @@ char scan_rcsid[] = #include #include #include +#include #include "rpc_scan.h" #include "rpc_parse.h" #include "rpc_util.h" diff --git a/sunrpc/svc_run.c b/sunrpc/svc_run.c index d854fb4f2c1..799c0125d69 100644 --- a/sunrpc/svc_run.c +++ b/sunrpc/svc_run.c @@ -37,6 +37,7 @@ static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro"; * Wait for input, call server program. */ #include +#include #include static int svc_stop; diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index 6f24dfa42a1..e40bea932eb 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #include #include +#include #include #include #include diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index cd24f726c91..542f9d46fa3 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include #include #include #include diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 3d95f4bc70d..9d7846105e1 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -45,6 +45,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include #ifdef USE_IN_LIBIO # include diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index a34e54dd71d..57c0135fb17 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -46,6 +46,7 @@ #include #include #include +#include /* * Ops vector for AF_UNIX based rpc service handle diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 4809589d072..101f8c85cee 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -48,6 +48,7 @@ #include #include #include +#include #ifdef USE_IN_LIBIO # include diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index 090925d0d74..2a9ffb16967 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; #include #include #include +#include #ifdef USE_IN_LIBIO # include diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 681ea70cf96..9207d52f6a6 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -75,7 +75,7 @@ __inline_copysign(copysign, double) #undef __MATH_INLINE_copysign -#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) +#if __GNUC_PREREQ (2, 8) __MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); } diff --git a/sysdeps/generic/morecore.c b/sysdeps/generic/morecore.c index 1e374da27d0..5e1ac58d7e6 100644 --- a/sysdeps/generic/morecore.c +++ b/sysdeps/generic/morecore.c @@ -30,7 +30,7 @@ systems with potentially hostile include files. */ #include -extern __ptr_t __sbrk __P ((ptrdiff_t increment)); +extern __malloc_ptr_t __sbrk __P ((ptrdiff_t increment)); #endif #ifndef NULL @@ -40,12 +40,12 @@ extern __ptr_t __sbrk __P ((ptrdiff_t increment)); /* Allocate INCREMENT more bytes of data space, and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ -__ptr_t +__malloc_ptr_t __default_morecore (increment) __malloc_ptrdiff_t increment; { - __ptr_t result = (__ptr_t) __sbrk (increment); - if (result == (__ptr_t) -1) + __malloc_ptr_t result = (__malloc_ptr_t) __sbrk (increment); + if (result == (__malloc_ptr_t) -1) return NULL; return result; } diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk index 0616b0303d7..3b2bd0d44d6 100644 --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -40,6 +40,7 @@ BEGIN { print "/* This file is generated from errno.texi by errlist.awk. */" print ""; print "#include "; + print "#include "; print ""; print "#ifndef SYS_ERRLIST"; print "# define SYS_ERRLIST _sys_errlist"; diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c index c718773d525..4c635d2b972 100644 --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -1,6 +1,7 @@ /* This file is generated from errno.texi by errlist.awk. */ #include +#include #ifndef SYS_ERRLIST # define SYS_ERRLIST _sys_errlist diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h index 8fb22d48d2e..00fe3c036fc 100644 --- a/sysdeps/i386/fpu/bits/mathinline.h +++ b/sysdeps/i386/fpu/bits/mathinline.h @@ -138,7 +138,7 @@ __signbitl (long double __x) /* The gcc, version 2.7 or below, has problems with all this inlining code. So disable it for this version of the compiler. */ -#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)) +#if __GNUC_PREREQ (2, 8) #if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ && defined __OPTIMIZE__) @@ -426,7 +426,7 @@ __inline_mathcode2 (pow, __x, __y, \ __inline_mathop (sqrt, "fsqrt") __inline_mathop_ (long double, __sqrtl, "fsqrt") -#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8) +#if __GNUC_PREREQ (2, 8) __inline_mathcode_ (double, fabs, __x, return __builtin_fabs (__x)) __inline_mathcode_ (float, fabsf, __x, return __builtin_fabsf (__x)) __inline_mathcode_ (long double, fabsl, __x, return __builtin_fabsl (__x)) diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c index 18261e11154..e4955e441d9 100644 --- a/sysdeps/mach/hurd/mips/dl-machine.c +++ b/sysdeps/mach/hurd/mips/dl-machine.c @@ -31,6 +31,7 @@ #include #include #include +#include void weak_function abort (void) diff --git a/sysdeps/posix/gai_strerror.c b/sysdeps/posix/gai_strerror.c index f5b33cb8dbd..490cd5bc577 100644 --- a/sysdeps/posix/gai_strerror.c +++ b/sysdeps/posix/gai_strerror.c @@ -19,6 +19,7 @@ #include #include +#include static struct { diff --git a/sysdeps/unix/make_errlist.c b/sysdeps/unix/make_errlist.c index 4d93a5d0dc7..b73b15230a0 100644 --- a/sysdeps/unix/make_errlist.c +++ b/sysdeps/unix/make_errlist.c @@ -58,6 +58,7 @@ main () Boston, MA 02111-1307, USA. */\n\n", year); puts ("#include \n"); + puts ("#include \n"); puts ("\n/* This is a list of all known `errno' codes. */\n"); printf ("\nconst int _sys_nerr = %d;\n\n", sys_nerr); diff --git a/sysdeps/unix/siglist.c b/sysdeps/unix/siglist.c index 942f7647ab1..3913c538af8 100644 --- a/sysdeps/unix/siglist.c +++ b/sysdeps/unix/siglist.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include /* This is a list of all known signal numbers. */ diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index 9a539604ffd..5d3a9afc538 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -19,6 +19,7 @@ #include #include #include +#include #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING # define SYS_SIGLIST __new_sys_siglist diff --git a/sysdeps/unix/sysv/linux/siglist.c b/sysdeps/unix/sysv/linux/siglist.c index d14a1b92f12..30d2a4ac60e 100644 --- a/sysdeps/unix/sysv/linux/siglist.c +++ b/sysdeps/unix/sysv/linux/siglist.c @@ -19,6 +19,7 @@ #include #include #include +#include #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING # define SYS_SIGLIST __new_sys_siglist diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c index 5d642e47f1f..fd8a503ef40 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include /* This is a list of all known `errno' codes. */ diff --git a/timezone/zic.c b/timezone/zic.c index 296f284c2aa..de706e83161 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -11,6 +11,8 @@ static char elsieid[] = "@(#)zic.c 7.99"; #include "sys/stat.h" /* for umask manifest constants */ #endif /* defined unix */ +#include + /* ** On some ancient hosts, predicates like `isspace(C)' are defined ** only if isascii(C) || C == EOF. Modern hosts obey the C Standard, -- 2.39.5