summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/gai_strerror.c3
-rw-r--r--sysdeps/generic/getdomain.c4
-rw-r--r--sysdeps/generic/getlogin_r.c3
-rw-r--r--sysdeps/i386/bits/byteswap.h58
-rw-r--r--sysdeps/mach/hurd/getdomain.c3
-rw-r--r--sysdeps/mach/hurd/getlogin_r.c3
-rw-r--r--sysdeps/posix/gai_strerror.c3
-rw-r--r--sysdeps/unix/getlogin_r.c5
-rw-r--r--sysdeps/unix/sysv/linux/opensock.c4
9 files changed, 48 insertions, 38 deletions
diff --git a/sysdeps/generic/gai_strerror.c b/sysdeps/generic/gai_strerror.c
index 0783631cbd..932c5910df 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 e15a018f78..6074ccfb79 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 534a70a0e4..f2470ee032 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 d08a342ab7..6812c61e4d 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 ed62f6dc6f..04f6e7d1d0 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 a3e51a5f71..f4d5faed76 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 ecca2bdcb7..f99f02638c 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 9007947e5f..b50776859f 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 86c4d39630..7913886b6c 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.  */