diff options
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | include/netdb.h | 1 | ||||
-rw-r--r-- | include/rpc/auth_des.h | 1 | ||||
-rw-r--r-- | include/string.h | 1 | ||||
-rw-r--r-- | include/unistd.h | 2 | ||||
-rw-r--r-- | locale/loadarchive.c | 8 | ||||
-rw-r--r-- | string/basename.c | 5 | ||||
-rw-r--r-- | sunrpc/rtime.c | 1 | ||||
-rw-r--r-- | sunrpc/svc_authux.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/gai_strerror.c | 3 | ||||
-rw-r--r-- | sysdeps/generic/getdomain.c | 4 | ||||
-rw-r--r-- | sysdeps/generic/getlogin_r.c | 3 | ||||
-rw-r--r-- | sysdeps/i386/bits/byteswap.h | 58 | ||||
-rw-r--r-- | sysdeps/mach/hurd/getdomain.c | 3 | ||||
-rw-r--r-- | sysdeps/mach/hurd/getlogin_r.c | 3 | ||||
-rw-r--r-- | sysdeps/posix/gai_strerror.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/getlogin_r.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/opensock.c | 4 |
18 files changed, 89 insertions, 45 deletions
@@ -1,5 +1,32 @@ 2002-08-11 Roland McGrath <roland@redhat.com> + * sunrpc/svc_authux.c (_svcauth_unix): Remove spurious printf (ugh!). + + * sysdeps/i386/bits/byteswap.h (__bswap_16, __bswap_32, __bswap_64): + Evaluate argument exactly once. Remove __volatile__ from asm's. + + * include/unistd.h: Use libc_hidden_proto for getdomainname + and getlogin_r. + * sysdeps/generic/getdomain.c: Add libc_hidden_def. + * sysdeps/mach/hurd/getdomain.c: Likewise. + * sysdeps/unix/getlogin_r.c: Likewise. + * sysdeps/mach/hurd/getlogin_r.c: Likewise. + * sysdeps/generic/getlogin_r.c: Likewise. + + * include/rpc/auth_des.h: Use libc_hidden_proto for rtime. + * sunrpc/rtime.c: Add libc_hidden_def. + + * include/string.h: Use libc_hidden_proto for basename. + * string/basename.c [_LIBC]: Add libc_hidden_def. + + * sysdeps/unix/sysv/linux/opensock.c (__opensock): socket -> __socket. + + * locale/loadarchive.c: munmap -> __munmap throughout. + + * include/netdb.h: Use libc_hidden_proto for gai_strerror. + * sysdeps/posix/gai_strerror.c: Add libc_hidden_def. + * sysdeps/generic/gai_strerror.c: Likewise. + * include/sys/errno.h: New file. * include/signal.h: No libc_hidden_proto for raise, diff --git a/include/netdb.h b/include/netdb.h index 3f3fc18..c77c403 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -31,6 +31,7 @@ libc_hidden_proto (ruserok_af) libc_hidden_proto (getaddrinfo) libc_hidden_proto (getnameinfo) libc_hidden_proto (freeaddrinfo) +libc_hidden_proto (gai_strerror) /* Document internal interfaces. */ extern int __gethostent_r (struct hostent *__restrict __result_buf, diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h index 4cacffa..6dee059 100644 --- a/include/rpc/auth_des.h +++ b/include/rpc/auth_des.h @@ -3,6 +3,7 @@ #include <sunrpc/rpc/auth_des.h> libc_hidden_proto (getpublickey) +libc_hidden_proto (rtime) extern bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred); extern bool_t xdr_authdes_verf (register XDR *xdrs, diff --git a/include/string.h b/include/string.h index d9a5eeb..e965cf4 100644 --- a/include/string.h +++ b/include/string.h @@ -71,6 +71,7 @@ libc_hidden_proto (__strdup) libc_hidden_proto (__strndup) libc_hidden_proto (__strerror_r) libc_hidden_proto (__strverscmp) +libc_hidden_proto (basename) # ifndef _ISOMAC # ifndef index diff --git a/include/unistd.h b/include/unistd.h index 7c1c5da..675f120 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -10,6 +10,8 @@ libc_hidden_proto (execlp) libc_hidden_proto (execvp) libc_hidden_proto (getpid) libc_hidden_proto (getsid) +libc_hidden_proto (getdomainname) +libc_hidden_proto (getlogin_r) /* Now define the internal interfaces. */ diff --git a/locale/loadarchive.c b/locale/loadarchive.c index ad06f12..52f58be 100644 --- a/locale/loadarchive.c +++ b/locale/loadarchive.c @@ -205,7 +205,7 @@ _nl_load_locale_from_archive (int category, const char **namep) if (calculate_head_size ((const struct locarhead *) result) > archive_stat.st_size) { - (void) munmap (result, archive_stat.st_size); + (void) __munmap (result, archive_stat.st_size); goto close_and_out; } __close (fd); @@ -389,7 +389,7 @@ _nl_load_locale_from_archive (int category, const char **namep) newp = (struct archmapped *) malloc (sizeof (struct archmapped)); if (newp == NULL) { - (void) munmap (addr, to - from); + (void) __munmap (addr, to - from); return NULL; } @@ -473,13 +473,13 @@ _nl_archive_subfreeres (void) assert (archmapped == &headmap); archmapped = NULL; - (void) munmap (headmap.ptr, headmap.len); + (void) __munmap (headmap.ptr, headmap.len); am = headmap.next; while (am != NULL) { struct archmapped *dead = am; am = am->next; - (void) munmap (dead->ptr, dead->len); + (void) __munmap (dead->ptr, dead->len); free (dead); } } diff --git a/string/basename.c b/string/basename.c index 358fca7..5ea1bb0 100644 --- a/string/basename.c +++ b/string/basename.c @@ -1,5 +1,5 @@ /* Return the name-within-directory of a file name. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996,97,98,2002 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 @@ -37,3 +37,6 @@ basename (filename) char *p = strrchr (filename, '/'); return p ? p + 1 : (char *) filename; } +#ifdef _LIBC +libc_hidden_def (basename) +#endif diff --git a/sunrpc/rtime.c b/sunrpc/rtime.c index 0c6d2ef..4996f01 100644 --- a/sunrpc/rtime.c +++ b/sunrpc/rtime.c @@ -145,3 +145,4 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep, timep->tv_usec = 0; return 0; } +libc_hidden_def (rtime) diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c index e5edac7..5b64c3d 100644 --- a/sunrpc/svc_authux.c +++ b/sunrpc/svc_authux.c @@ -104,8 +104,6 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) */ if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { - (void) printf ("bad auth_len gid %d str %d auth %d\n", - gid_len, str_len, auth_len); stat = AUTH_BADCRED; goto done; } diff --git a/sysdeps/generic/gai_strerror.c b/sysdeps/generic/gai_strerror.c index 0783631..932c591 100644 --- a/sysdeps/generic/gai_strerror.c +++ b/sysdeps/generic/gai_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2001,02 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 @@ -26,3 +26,4 @@ gai_strerror (int code) snprintf (buffer, sizeof buffer, "Unknown error (%d)", code); return buffer; } +libc_hidden_def (gai_strerror) diff --git a/sysdeps/generic/getdomain.c b/sysdeps/generic/getdomain.c index e15a018..6074ccf 100644 --- a/sysdeps/generic/getdomain.c +++ b/sysdeps/generic/getdomain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994,95,97,2000,02 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 @@ -60,3 +60,5 @@ stub_warning (getdomainname) #include <stub-tag.h> #endif + +libc_hidden_def (getdomainname) diff --git a/sysdeps/generic/getlogin_r.c b/sysdeps/generic/getlogin_r.c index 534a70a..f2470ee 100644 --- a/sysdeps/generic/getlogin_r.c +++ b/sysdeps/generic/getlogin_r.c @@ -1,5 +1,5 @@ /* Reentrant function to return the current login name. Stub version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 2002 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 @@ -31,6 +31,7 @@ getlogin_r (name, name_len) __set_errno (ENOSYS); return errno; } +libc_hidden_def (getlogin_r) stub_warning (getlogin_r) #include <stub-tag.h> diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h index d08a342..6812c61 100644 --- a/sysdeps/i386/bits/byteswap.h +++ b/sysdeps/i386/bits/byteswap.h @@ -31,18 +31,20 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_16(x) \ (__extension__ \ - ({ register unsigned short int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_16 (x); \ + ({ register unsigned short int __v, __x = (x); \ + if (__builtin_constant_p (__x)) \ + __v = __bswap_constant_16 (__x); \ else \ - __asm__ __volatile__ ("rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((unsigned short int) (x)) \ - : "cc"); \ + __asm__ ("rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ __v; })) #else /* This is better than nothing. */ -# define __bswap_16(x) __bswap_constant_16 (x) +# define __bswap_16(x) \ + (__extension__ \ + ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); })) #endif @@ -55,33 +57,33 @@ /* To swap the bytes in a word the i486 processors and up provide the `bswap' opcode. On i386 we have to use three instructions. */ # if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ -# define __bswap_32(x) \ +# define __bswap_32(x) \ (__extension__ \ - ({ register unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ + ({ register unsigned int __v, __x = (x); \ + if (__builtin_constant_p (__x)) \ + __v = __bswap_constant_32 (__x); \ else \ - __asm__ __volatile__ ("rorw $8, %w0;" \ - "rorl $16, %0;" \ - "rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((unsigned int) (x)) \ - : "cc"); \ + __asm__ ("rorw $8, %w0;" \ + "rorl $16, %0;" \ + "rorw $8, %w0" \ + : "=r" (__v) \ + : "0" (__x) \ + : "cc"); \ __v; })) # else # define __bswap_32(x) \ (__extension__ \ - ({ register unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ + ({ register unsigned int __v, __x = (x); \ + if (__builtin_constant_p (__x)) \ + __v = __bswap_constant_32 (__x); \ else \ - __asm__ __volatile__ ("bswap %0" \ - : "=r" (__v) \ - : "0" ((unsigned int) (x))); \ + __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \ __v; })) # endif #else -# define __bswap_32(x) __bswap_constant_32 (x) +# define __bswap_16(x) \ + (__extension__ \ + ({ register unsigned int __x = (x); __bswap_constant_32 (__x); })) #endif @@ -101,11 +103,11 @@ (__extension__ \ ({ union { __extension__ unsigned long long int __ll; \ unsigned long int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ + __w.__ll = (x); \ + if (__builtin_constant_p (__w.__ll)) \ + __r.__ll = __bswap_constant_64 (__w.__ll); \ else \ { \ - __w.__ll = (x); \ __r.__l[0] = __bswap_32 (__w.__l[1]); \ __r.__l[1] = __bswap_32 (__w.__l[0]); \ } \ diff --git a/sysdeps/mach/hurd/getdomain.c b/sysdeps/mach/hurd/getdomain.c index ed62f6d..04f6e7d 100644 --- a/sysdeps/mach/hurd/getdomain.c +++ b/sysdeps/mach/hurd/getdomain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002 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 @@ -29,3 +29,4 @@ getdomainname (char *name, size_t len) ssize_t n = _hurd_get_host_config ("/etc/nisdomain", name, len); return n < 0 ? -1 : 0; } +libc_hidden_def (getdomainname) diff --git a/sysdeps/mach/hurd/getlogin_r.c b/sysdeps/mach/hurd/getlogin_r.c index a3e51a5..f4d5fae 100644 --- a/sysdeps/mach/hurd/getlogin_r.c +++ b/sysdeps/mach/hurd/getlogin_r.c @@ -1,5 +1,5 @@ /* Reentrant function to return the current login name. Hurd version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 2002 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 @@ -39,3 +39,4 @@ getlogin_r (name, name_len) strncpy (name, login, name_len); return 0; } +libc_hidden_def (getlogin_r) diff --git a/sysdeps/posix/gai_strerror.c b/sysdeps/posix/gai_strerror.c index ecca2bd..f99f026 100644 --- a/sysdeps/posix/gai_strerror.c +++ b/sysdeps/posix/gai_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997,2001,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997. @@ -56,3 +56,4 @@ gai_strerror (int code) return _("Unknown error"); } +libc_hidden_def (gai_strerror) diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c index 9007947..b507768 100644 --- a/sysdeps/unix/getlogin_r.c +++ b/sysdeps/unix/getlogin_r.c @@ -1,5 +1,5 @@ /* Reentrant function to return the current login name. Unix version. - Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991,92,96,97,98,2002 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 @@ -51,7 +51,7 @@ getlogin_r (name, name_len) getlogin(). */ result = __ttyname_r (0, real_tty_path, sizeof (tty_pathname)); - + if (result != 0) return result; @@ -86,3 +86,4 @@ getlogin_r (name, name_len) return result; } +libc_hidden_def (getlogin_r) diff --git a/sysdeps/unix/sysv/linux/opensock.c b/sysdeps/unix/sysv/linux/opensock.c index 86c4d39..7913886 100644 --- a/sysdeps/unix/sysv/linux/opensock.c +++ b/sysdeps/unix/sysv/linux/opensock.c @@ -67,7 +67,7 @@ __opensock (void) { assert (last_type != 0); - result = socket (last_family, last_type, 0); + result = __socket (last_family, last_type, 0); if (result != -1 || errno != EAFNOSUPPORT) /* Maybe the socket type isn't supported anymore (module is unloaded). In this case again try to find the type. */ @@ -102,7 +102,7 @@ __opensock (void) if (afs[cnt].family == AF_NETROM || afs[cnt].family == AF_X25) type = SOCK_SEQPACKET; - result = socket (afs[cnt].family, type, 0); + result = __socket (afs[cnt].family, type, 0); if (result != -1) { /* Found an available family. */ |