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,
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,
#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,
libc_hidden_proto (__strndup)
libc_hidden_proto (__strerror_r)
libc_hidden_proto (__strverscmp)
+libc_hidden_proto (basename)
# ifndef _ISOMAC
# ifndef index
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. */
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);
newp = (struct archmapped *) malloc (sizeof (struct archmapped));
if (newp == NULL)
{
- (void) munmap (addr, to - from);
+ (void) __munmap (addr, to - from);
return NULL;
}
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);
}
}
/* 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
char *p = strrchr (filename, '/');
return p ? p + 1 : (char *) filename;
}
+#ifdef _LIBC
+libc_hidden_def (basename)
+#endif
timep->tv_usec = 0;
return 0;
}
+libc_hidden_def (rtime)
*/
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;
}
-/* 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
snprintf (buffer, sizeof buffer, "Unknown error (%d)", code);
return buffer;
}
+libc_hidden_def (gai_strerror)
-/* 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
#include <stub-tag.h>
#endif
+
+libc_hidden_def (getdomainname)
/* 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
__set_errno (ENOSYS);
return errno;
}
+libc_hidden_def (getlogin_r)
stub_warning (getlogin_r)
#include <stub-tag.h>
#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
/* 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
(__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]); \
} \
-/* 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
ssize_t n = _hurd_get_host_config ("/etc/nisdomain", name, len);
return n < 0 ? -1 : 0;
}
+libc_hidden_def (getdomainname)
/* 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
strncpy (name, login, name_len);
return 0;
}
+libc_hidden_def (getlogin_r)
-/* 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.
return _("Unknown error");
}
+libc_hidden_def (gai_strerror)
/* 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
getlogin(). */
result = __ttyname_r (0, real_tty_path, sizeof (tty_pathname));
-
+
if (result != 0)
return result;
return result;
}
+libc_hidden_def (getlogin_r)
{
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. */
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. */