From 6796bc807aa3808f6afb5da42932e437bdd183cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Sep 1998 23:45:24 +0000 Subject: [PATCH] Update. 1998-09-06 09:53 -0400 Zack Weinberg * Makeconfig (+gccwarn): Remove -Wno-parentheses. * elf/dl-open.c: Quiet -Wparentheses warnings. * iconvdata/johab.c: Likewise. * iconvdata/uhc.c: Likewise. * inet/inet_net.c: Likewise. * io/fts.c: Likewise. * locale/newlocale.c: Likewise. * misc/getttyent.c: Likewise. * misc/mntent_r.c: Likewise. * misc/ttyslot.c: Likewise. * nscd/nscd_conf.c: Likewise. * nss/nsswitch.c: Likewise. * resolv/gethnamaddr.c: Likewise. * resolv/nsap_addr.c: Likewise. * resolv/res_debug.c: Likewise. * stdio-common/_itoa.c: Likewise. * stdlib/strtod.c: Likewise. * string/strverscmp.c: Likewise. * sunrpc/svc.c: Likewise. * sysdeps/libm-ieee754/e_cosh.c: Likewise. * sysdeps/libm-ieee754/e_gamma_r.c: Likewise. * sysdeps/libm-ieee754/e_sinh.c: Likewise. * sysdeps/posix/getaddrinfo.c: Likewise. * include/dlfcn.h: Likewise. * elf/dlfcn.h: Declare dladdr only for __USE_GNU. Define RTLD_DEFAULT. --- ChangeLog | 35 +++++++++++++++++++++--- Makeconfig | 2 +- elf/dl-open.c | 2 +- iconvdata/johab.c | 6 ++-- iconvdata/uhc.c | 2 +- include/alloca.h | 4 +++ include/db.h | 4 +++ include/db_185.h | 2 ++ include/dlfcn.h | 2 ++ include/fcntl.h | 2 ++ include/grp.h | 2 ++ include/libintl.h | 2 ++ include/mntent.h | 2 ++ include/pwd.h | 2 ++ include/sched.h | 4 ++- include/search.h | 2 ++ include/setjmp.h | 2 ++ include/shadow.h | 2 ++ include/signal.h | 2 ++ include/stdio.h | 2 ++ include/stdlib.h | 2 ++ include/string.h | 2 ++ include/sys/file.h | 2 ++ include/sys/gmon.h | 2 ++ include/sys/ioctl.h | 2 ++ include/sys/mman.h | 2 ++ include/sys/resource.h | 2 ++ include/sys/select.h | 2 ++ include/sys/socket.h | 2 ++ include/sys/statfs.h | 2 ++ include/sys/time.h | 2 ++ include/sys/times.h | 2 ++ include/sys/wait.h | 2 ++ include/termios.h | 2 ++ include/tgmath.h | 1 + include/time.h | 2 ++ include/ulimit.h | 2 ++ include/utmp.h | 2 ++ include/wchar.h | 2 ++ inet/inet_net.c | 2 +- io/fts.c | 16 ++++++----- libio/stdio.h | 10 +++---- linuxthreads/ChangeLog | 4 +++ linuxthreads/sysdeps/pthread/semaphore.h | 1 + locale/newlocale.c | 2 +- manual/creature.texi | 14 ++++++++++ misc/getttyent.c | 6 ++-- misc/mntent_r.c | 9 +++--- misc/ttyslot.c | 4 +-- nscd/nscd_conf.c | 2 +- nss/nsswitch.c | 3 +- posix/wordexp-test.c | 7 ++++- posix/wordexp.c | 30 ++++++++------------ resolv/gethnamaddr.c | 8 +++--- resolv/nsap_addr.c | 2 +- resolv/res_debug.c | 6 ++-- stdio-common/_itoa.c | 2 +- stdlib/strtod.c | 2 +- string/strverscmp.c | 4 +-- sunrpc/svc.c | 2 +- sysdeps/libm-ieee754/e_cosh.c | 5 ++-- sysdeps/libm-ieee754/e_gamma_r.c | 2 +- sysdeps/libm-ieee754/e_sinh.c | 4 +-- sysdeps/posix/getaddrinfo.c | 6 ++-- time/strftime.c | 9 +++++- 65 files changed, 204 insertions(+), 78 deletions(-) create mode 100644 include/tgmath.h create mode 100644 linuxthreads/sysdeps/pthread/semaphore.h diff --git a/ChangeLog b/ChangeLog index 94bd4551eb..06569df02b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +1998-09-06 09:53 -0400 Zack Weinberg + + * Makeconfig (+gccwarn): Remove -Wno-parentheses. + + * elf/dl-open.c: Quiet -Wparentheses warnings. + * iconvdata/johab.c: Likewise. + * iconvdata/uhc.c: Likewise. + * inet/inet_net.c: Likewise. + * io/fts.c: Likewise. + * locale/newlocale.c: Likewise. + * misc/getttyent.c: Likewise. + * misc/mntent_r.c: Likewise. + * misc/ttyslot.c: Likewise. + * nscd/nscd_conf.c: Likewise. + * nss/nsswitch.c: Likewise. + * resolv/gethnamaddr.c: Likewise. + * resolv/nsap_addr.c: Likewise. + * resolv/res_debug.c: Likewise. + * stdio-common/_itoa.c: Likewise. + * stdlib/strtod.c: Likewise. + * string/strverscmp.c: Likewise. + * sunrpc/svc.c: Likewise. + * sysdeps/libm-ieee754/e_cosh.c: Likewise. + * sysdeps/libm-ieee754/e_gamma_r.c: Likewise. + * sysdeps/libm-ieee754/e_sinh.c: Likewise. + * sysdeps/posix/getaddrinfo.c: Likewise. + 1998-09-06 15:13 Ulrich Drepper * elf/dlsym.c (dlsym_doit): Use new RTLD_DEFAULT macro to test @@ -38,6 +65,7 @@ * include/alloca.h: Add multiple-inclusion guard. * include/db.h: Likewise. * include/db_185.h: Likewise. + * include/dlfcn.h: Likewise. * include/fcntl.h: Likewise. * include/grp.h: Likewise. * include/libintl.h: Likewise. @@ -68,9 +96,6 @@ * include/sys/times.h: Likewise. * include/sys/wait.h: Likewise. - * include/dlfcn.h: Declare dladdr only for __USE_GNU. - Define RTLD_DEFAULT. - 1998-09-06 09:00 Ulrich Drepper * version.h (VERSION): Bump to 2.0.96. @@ -95,7 +120,6 @@ * elf/dl-support.c: Likewise. * elf/dl-symbol.c: Likewise. * elf/dl-version.c: Likewise. - * elf/dlfcn.h: Likewise. * elf/dlsym.c: Likewise. * elf/dlvsym.c: Likewise. * elf/ldsodefs.h: Likewise. @@ -105,6 +129,9 @@ * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. + * elf/dlfcn.h: Declare dladdr only for __USE_GNU. + Define RTLD_DEFAULT. + 1998-09-05 Mark Kettenis * sysdeps/mach/hurd/i386/init-first.c (init1): Call diff --git a/Makeconfig b/Makeconfig index b0141d4cb6..1858dd54a9 100644 --- a/Makeconfig +++ b/Makeconfig @@ -489,7 +489,7 @@ RANLIB = ranlib endif # Extra flags to pass to GCC. -+gccwarn := -Wall -Wwrite-strings -Wno-parentheses -Winline -Wstrict-prototypes ++gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes # This is the program that generates makefile # dependencies from C source files. diff --git a/elf/dl-open.c b/elf/dl-open.c index 6765b6ce08..694b0ebfaa 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -192,7 +192,7 @@ dl_open_worker (void *a) _dl_debug_state (); /* Run the initializer functions of new objects. */ - while (init = _dl_init_next (&new->l_searchlist)) + while ((init = _dl_init_next (&new->l_searchlist))) (*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv, __environ); diff --git a/iconvdata/johab.c b/iconvdata/johab.c index 6da169438c..6a5d8be68f 100644 --- a/iconvdata/johab.c +++ b/iconvdata/johab.c @@ -220,11 +220,11 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) } \ else if (i > 0 && m > 0) \ ch = ((i - 1) * 21 + (m - 1)) * 28 + f + 0xac00; \ - else if (i > 0 && m == 0 & f == 0) \ + else if (i > 0 && m == 0 && f == 0) \ ch = init_to_ucs[i - 1]; \ - else if (i == 0 && m > 0 & f == 0) \ + else if (i == 0 && m > 0 && f == 0) \ ch = 0x314e + m; /* 0x314f + m - 1 */ \ - else if (i == 0 && m == 0 & f > 0) \ + else if (i == 0 && m == 0 && f > 0) \ ch = final_to_ucs[f - 1]; /* round trip?? */ \ else \ { \ diff --git a/iconvdata/uhc.c b/iconvdata/uhc.c index 0fa6d40f74..5aef36cdd0 100644 --- a/iconvdata/uhc.c +++ b/iconvdata/uhc.c @@ -3170,7 +3170,7 @@ static const char uhc_hangul_from_ucs[11172][2] = *outptr++ = s[0]; \ *outptr++ = s[1]; \ } \ - else if (ch >= 0x4e00 && ch <= 0x9fa5 || ch >= 0xf900 && ch <= 0xfa0b) \ + else if ((ch >= 0x4e00 && ch <= 0x9fa5) || (ch >= 0xf900 && ch <= 0xfa0b))\ { \ size_t written = ucs4_to_ksc5601_hanja (ch, outptr, \ (NEED_LENGTH_TEST \ diff --git a/include/alloca.h b/include/alloca.h index ae41090bd1..4dcddb6ae1 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -1,3 +1,5 @@ +#ifndef _ALLOCA_H + #include #undef __alloca @@ -8,3 +10,5 @@ extern __ptr_t __alloca __P ((size_t __size)); #ifdef __GNUC__ # define __alloca(size) __builtin_alloca (size) #endif /* GCC. */ + +#endif diff --git a/include/db.h b/include/db.h index 13e9c307eb..64c7348ea6 100644 --- a/include/db.h +++ b/include/db.h @@ -1,5 +1,9 @@ +#ifndef _DB_H_ + #include /* Internal interface for NSS. */ int __nss_db_open __P((const char *, DBTYPE, u_int32_t, int, DB_ENV *, DB_INFO *, DB **)); + +#endif diff --git a/include/db_185.h b/include/db_185.h index db78199865..37bb16e99b 100644 --- a/include/db_185.h +++ b/include/db_185.h @@ -1,4 +1,6 @@ +#ifndef _DB_185_H_ #include /* Now define the internal interfaces. */ DB *__dbopen __P((const char *, int, int, DBTYPE, const void *)); +#endif diff --git a/include/dlfcn.h b/include/dlfcn.h index 766c80a11a..955819739a 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -1,5 +1,7 @@ +#ifndef _DLFCN_H #include /* Now define the internal interfaces. */ extern void *__dlvsym __P ((void *__handle, __const char *__name, __const char *__version)); +#endif diff --git a/include/fcntl.h b/include/fcntl.h index cce3d5ee10..949c6621fd 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -1,4 +1,6 @@ +#ifndef _FCNTL_H #include /* Now define the internal interfaces. */ extern int __open64 __P ((__const char *__file, int __oflag, ...)); +#endif diff --git a/include/grp.h b/include/grp.h index ddde842fe6..14be78cf00 100644 --- a/include/grp.h +++ b/include/grp.h @@ -1,3 +1,4 @@ +#ifndef _GRP_H #include /* Now define the internal interfaces. */ @@ -6,3 +7,4 @@ extern int __getgrent_r __P ((struct group *__resultbuf, char *buffer, extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf, char *buffer, size_t __buflen, struct group **__result)); +#endif diff --git a/include/libintl.h b/include/libintl.h index 582cb05d74..3763b04c5f 100644 --- a/include/libintl.h +++ b/include/libintl.h @@ -1,3 +1,4 @@ +#ifndef _LIBINTL_H #include /* Now define the internal interfaces. */ @@ -5,3 +6,4 @@ extern char *__gettext __P ((__const char *__msgid)); extern char *__textdomain __P ((__const char *__domainname)); extern char *__bindtextdomain __P ((__const char *__domainname, __const char *__dirname)); +#endif diff --git a/include/mntent.h b/include/mntent.h index d869625607..ca8dfc5069 100644 --- a/include/mntent.h +++ b/include/mntent.h @@ -1,3 +1,4 @@ +#ifndef _MNTENT_H #include /* Now define the internal interfaces. */ @@ -9,3 +10,4 @@ extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt)); extern int __endmntent __P ((FILE *__stream)); extern char *__hasmntopt __P ((__const struct mntent *__mnt, __const char *__opt)); +#endif diff --git a/include/pwd.h b/include/pwd.h index 2c57df938f..18e8ac7e94 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -1,3 +1,4 @@ +#ifndef _PWD_H #include /* Now define the internal interfaces. */ @@ -12,3 +13,4 @@ extern int __getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf, extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf, char *__buffer, size_t __buflen, struct passwd **__result)); +#endif diff --git a/include/sched.h b/include/sched.h index 02dc60a872..d28a0123f9 100644 --- a/include/sched.h +++ b/include/sched.h @@ -1,7 +1,9 @@ -#include "posix/sched.h" +#ifndef _SCHED_H +#include /* Now define the internal interfaces. */ /* This is Linux specific. */ extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg)); +#endif diff --git a/include/search.h b/include/search.h index 05dc75aee9..2b4c63ba53 100644 --- a/include/search.h +++ b/include/search.h @@ -1,3 +1,4 @@ +#ifndef _SEARCH_H #include /* Now define the internal interfaces. */ @@ -10,3 +11,4 @@ extern void *__tdelete __PMT ((__const void *__key, void **__rootp, __compar_fn_t compar)); extern void __twalk __PMT ((__const void *__root, __action_fn_t action)); extern void __tdestroy __PMT ((void *__root, __free_fn_t freefct)); +#endif diff --git a/include/setjmp.h b/include/setjmp.h index 34fc9e5f69..97b1c3a46f 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -1,3 +1,4 @@ +#ifndef _SETJMP_H #include /* Now define the internal interfaces. */ @@ -11,3 +12,4 @@ extern void __longjmp __P ((__jmp_buf __env, int __val)) This is used by the machine-dependent definition of `__sigsetjmp'. Always returns zero, for convenience. */ extern int __sigjmp_save __P ((jmp_buf __env, int __savemask)); +#endif diff --git a/include/shadow.h b/include/shadow.h index 5e7f943bc0..be40eb42fa 100644 --- a/include/shadow.h +++ b/include/shadow.h @@ -1,3 +1,4 @@ +#ifndef _SHADOW_H #include /* Now define the internal interfaces. */ @@ -14,3 +15,4 @@ extern int __fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf, struct spwd **__result)); extern int __lckpwdf __P ((void)); extern int __ulckpwdf __P ((void)); +#endif diff --git a/include/signal.h b/include/signal.h index 693aeb807a..1a14ff3dc7 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1,3 +1,4 @@ +#ifndef _SIGNAL_H #if defined __need_sig_atomic_t || defined __need_sigset_t # include #else @@ -23,3 +24,4 @@ extern int __sigreturn __P ((struct sigcontext *__scp)); extern int __sigaltstack __P ((__const struct sigaltstack *__ss, struct sigaltstack *__oss)); #endif +#endif diff --git a/include/stdio.h b/include/stdio.h index d09e29d1c1..a3272fc8e9 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -1,3 +1,4 @@ +#ifndef _STDIO_H #ifdef USE_IN_LIBIO #ifdef __need_FILE # include @@ -27,3 +28,4 @@ extern int __vsscanf __P ((__const char *__restrict __s, #else #include #endif +#endif diff --git a/include/stdlib.h b/include/stdlib.h index c45730428b..7424243e99 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,3 +1,4 @@ +#ifndef _STDLIB_H #include /* Now define the internal interfaces. */ @@ -39,3 +40,4 @@ extern char *__canonicalize_file_name __P ((__const char *__name)); extern char *__realpath __P ((__const char *__name, char *__resolved)); extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen)); extern int __getpt __P ((void)); +#endif diff --git a/include/string.h b/include/string.h index 1ee7ced249..d83a56e053 100644 --- a/include/string.h +++ b/include/string.h @@ -1,3 +1,4 @@ +#ifndef _STRING_H #include /* Now define the internal interfaces. */ @@ -6,3 +7,4 @@ extern __ptr_t __memccpy __P ((__ptr_t __dest, __const __ptr_t __src, extern size_t __strnlen __P ((__const char *__string, size_t __maxlen)); extern char *__strsep __P ((char **__stringp, __const char *__delim)); extern int __strverscmp __P ((__const char *__s1, __const char *__s2)); +#endif diff --git a/include/sys/file.h b/include/sys/file.h index ec7f3de73d..c3f0af3710 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1,4 +1,6 @@ +#ifndef _SYS_FILE_H #include /* Now define the internal interfaces. */ extern int __flock __P ((int __fd, int __operation)); +#endif diff --git a/include/sys/gmon.h b/include/sys/gmon.h index 2e56188027..492d853f8e 100644 --- a/include/sys/gmon.h +++ b/include/sys/gmon.h @@ -1,3 +1,4 @@ +#ifndef _SYS_GMON_H #include /* Now define the internal interfaces. */ @@ -5,3 +6,4 @@ /* Write current profiling data to file. */ extern void __write_profiling __P ((void)); extern void write_profiling __P ((void)); +#endif diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h index e07b08a64f..4d21030ed9 100644 --- a/include/sys/ioctl.h +++ b/include/sys/ioctl.h @@ -1,4 +1,6 @@ +#ifndef _SYS_IOCTL_H #include /* Now define the internal interfaces. */ extern int __ioctl __P ((int __fd, unsigned long int __request, ...)); +#endif diff --git a/include/sys/mman.h b/include/sys/mman.h index 3a6c33a354..32c2084bdd 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -1,3 +1,4 @@ +#ifndef _SYS_MMAN_H #include_next /* Now define the internal interfaces. */ @@ -11,3 +12,4 @@ extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* This one is Linux specific. */ extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len, size_t __new_len, int __may_move)); +#endif diff --git a/include/sys/resource.h b/include/sys/resource.h index 36950e2f10..ec53c188f9 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -1,6 +1,8 @@ +#ifndef _SYS_RESOURCE_H #include /* Now define the internal interfaces. */ extern int __getrlimit __P ((enum __rlimit_resource __resource, struct rlimit *__rlimits)); extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage)); +#endif diff --git a/include/sys/select.h b/include/sys/select.h index 860b01347d..be98aa2eb4 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -1,6 +1,8 @@ +#ifndef _SYS_SELECT_H #include /* Now define the internal interfaces. */ extern int __pselect __P ((int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, struct timespec *__timeout)); +#endif diff --git a/include/sys/socket.h b/include/sys/socket.h index a319272b55..4766c206d8 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -1,4 +1,6 @@ +#ifndef _SYS_SOCKET_H #include /* Now define the internal interfaces. */ extern int __socket __P ((int __domain, int __type, int __protocol)); +#endif diff --git a/include/sys/statfs.h b/include/sys/statfs.h index bb4999e2a3..80c8834be4 100644 --- a/include/sys/statfs.h +++ b/include/sys/statfs.h @@ -1,5 +1,7 @@ +#ifndef _SYS_STATFS_H #include /* Now define the internal interfaces. */ extern int __statfs __P ((__const char *__file, struct statfs *__buf)); extern int __fstatfs __P ((int __fildes, struct statfs *__buf)); +#endif diff --git a/include/sys/time.h b/include/sys/time.h index fd9f46778d..5f53e967f6 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,3 +1,4 @@ +#ifndef _SYS_TIME_H #include