Browse Source

make gcc4 happy w/ hidden_def/proto, correct some typos

Peter S. Mazinger 19 years ago
parent
commit
0d212a2b26
58 changed files with 138 additions and 130 deletions
  1. 0 1
      libc/inet/rpc/authunix_prot.c
  2. 8 8
      libc/inet/socketcalls.c
  3. 0 1
      libc/misc/fnmatch/fnmatch.c
  4. 28 27
      libc/misc/glob/glob.c
  5. 7 9
      libc/misc/glob/glob64.c
  6. 13 10
      libc/misc/ttyent/getttyent.c
  7. 4 3
      libc/misc/utmp/utent.c
  8. 3 8
      libc/misc/wchar/wstdio.c
  9. 1 1
      libc/signal/sigaction.c
  10. 1 1
      libc/signal/signal.c
  11. 1 1
      libc/stdio/fflush.c
  12. 6 4
      libc/stdio/fgetc.c
  13. 1 1
      libc/stdio/fgets.c
  14. 3 2
      libc/stdio/fgetwc.c
  15. 1 1
      libc/stdio/fileno.c
  16. 3 3
      libc/stdio/fputc.c
  17. 1 1
      libc/stdio/fputs.c
  18. 1 1
      libc/stdio/fputws.c
  19. 1 1
      libc/stdio/fread.c
  20. 1 1
      libc/stdio/fwrite.c
  21. 8 5
      libc/stdlib/stdlib.c
  22. 1 1
      libc/string/generic/strcmp.c
  23. 1 1
      libc/string/i386/strcmp.c
  24. 1 1
      libc/string/strcmp.c
  25. 1 1
      libc/string/strlcpy.c
  26. 2 0
      libc/string/strncmp.c
  27. 2 0
      libc/string/strncpy.c
  28. 1 1
      libc/string/strrchr.c
  29. 1 1
      libc/sysdeps/linux/arm/sigaction.c
  30. 2 2
      libc/sysdeps/linux/common/__syscall_fcntl.c
  31. 1 1
      libc/sysdeps/linux/common/__syscall_fcntl64.c
  32. 1 1
      libc/sysdeps/linux/common/close.c
  33. 1 1
      libc/sysdeps/linux/common/fork.c
  34. 1 1
      libc/sysdeps/linux/common/fstat.c
  35. 1 1
      libc/sysdeps/linux/common/getpagesize.c
  36. 1 1
      libc/sysdeps/linux/common/getpid.c
  37. 2 1
      libc/sysdeps/linux/common/llseek.c
  38. 1 1
      libc/sysdeps/linux/common/longjmp.c
  39. 1 1
      libc/sysdeps/linux/common/lseek.c
  40. 1 1
      libc/sysdeps/linux/common/lstat.c
  41. 1 1
      libc/sysdeps/linux/common/nanosleep.c
  42. 1 1
      libc/sysdeps/linux/common/open.c
  43. 1 1
      libc/sysdeps/linux/common/open64.c
  44. 1 1
      libc/sysdeps/linux/common/read.c
  45. 1 1
      libc/sysdeps/linux/common/stat.c
  46. 1 1
      libc/sysdeps/linux/common/waitpid.c
  47. 1 1
      libc/sysdeps/linux/common/write.c
  48. 1 1
      libc/sysdeps/linux/cris/fork.c
  49. 1 1
      libc/sysdeps/linux/frv/fstat.c
  50. 1 1
      libc/sysdeps/linux/frv/fstat64.c
  51. 1 1
      libc/sysdeps/linux/frv/lstat.c
  52. 1 1
      libc/sysdeps/linux/frv/lstat64.c
  53. 1 1
      libc/sysdeps/linux/frv/stat.c
  54. 1 1
      libc/sysdeps/linux/frv/stat64.c
  55. 1 1
      libc/sysdeps/linux/i386/sigaction.c
  56. 1 1
      libc/sysdeps/linux/mips/sigaction.c
  57. 1 1
      libc/sysdeps/linux/x86_64/sigaction.c
  58. 6 5
      libpthread/linuxthreads.old/forward.c

+ 0 - 1
libc/inet/rpc/authunix_prot.c

@@ -40,7 +40,6 @@
 #include <rpc/auth_unix.h>
 #include <rpc/auth_unix.h>
 
 
 libc_hidden_proto(xdr_string)
 libc_hidden_proto(xdr_string)
-libc_hidden_def(xdr_string)
 libc_hidden_proto(xdr_u_int)
 libc_hidden_proto(xdr_u_int)
 libc_hidden_proto(xdr_array)
 libc_hidden_proto(xdr_array)
 libc_hidden_proto(xdr_u_long)
 libc_hidden_proto(xdr_u_long)

+ 8 - 8
libc/inet/socketcalls.c

@@ -49,8 +49,8 @@ int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
 	return __socketcall(SYS_ACCEPT, args);
 	return __socketcall(SYS_ACCEPT, args);
 }
 }
 #endif
 #endif
-strong_alias(__libc_accept,accept)
 libc_hidden_proto(accept)
 libc_hidden_proto(accept)
+strong_alias(__libc_accept,accept)
 libc_hidden_def(accept)
 libc_hidden_def(accept)
 #endif
 #endif
 
 
@@ -87,8 +87,8 @@ int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
 	return __socketcall(SYS_CONNECT, args);
 	return __socketcall(SYS_CONNECT, args);
 }
 }
 #endif
 #endif
-strong_alias(__libc_connect,connect)
 libc_hidden_proto(connect)
 libc_hidden_proto(connect)
+strong_alias(__libc_connect,connect)
 libc_hidden_def(connect)
 libc_hidden_def(connect)
 #endif
 #endif
 
 
@@ -185,8 +185,8 @@ ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
 	return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
 	return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
 }
 }
 #endif
 #endif
-strong_alias(__libc_recv,recv)
 libc_hidden_proto(recv)
 libc_hidden_proto(recv)
+strong_alias(__libc_recv,recv)
 libc_hidden_def(recv)
 libc_hidden_def(recv)
 #endif
 #endif
 
 
@@ -211,8 +211,8 @@ ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
 	return (__socketcall(SYS_RECVFROM, args));
 	return (__socketcall(SYS_RECVFROM, args));
 }
 }
 #endif
 #endif
-strong_alias(__libc_recvfrom,recvfrom)
 libc_hidden_proto(recvfrom)
 libc_hidden_proto(recvfrom)
+strong_alias(__libc_recvfrom,recvfrom)
 libc_hidden_def(recvfrom)
 libc_hidden_def(recvfrom)
 #endif
 #endif
 
 
@@ -231,8 +231,8 @@ ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
 	return (__socketcall(SYS_RECVMSG, args));
 	return (__socketcall(SYS_RECVMSG, args));
 }
 }
 #endif
 #endif
-strong_alias(__libc_recvmsg,recvmsg)
 libc_hidden_proto(recvmsg)
 libc_hidden_proto(recvmsg)
+strong_alias(__libc_recvmsg,recvmsg)
 libc_hidden_def(recvmsg)
 libc_hidden_def(recvmsg)
 #endif
 #endif
 
 
@@ -259,8 +259,8 @@ ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
 	return (sendto(sockfd, buffer, len, flags, NULL, 0));
 	return (sendto(sockfd, buffer, len, flags, NULL, 0));
 }
 }
 #endif
 #endif
-strong_alias(__libc_send,send)
 libc_hidden_proto(send)
 libc_hidden_proto(send)
+strong_alias(__libc_send,send)
 libc_hidden_def(send)
 libc_hidden_def(send)
 #endif
 #endif
 
 
@@ -279,8 +279,8 @@ ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
 	return (__socketcall(SYS_SENDMSG, args));
 	return (__socketcall(SYS_SENDMSG, args));
 }
 }
 #endif
 #endif
-strong_alias(__libc_sendmsg,sendmsg)
 libc_hidden_proto(sendmsg)
 libc_hidden_proto(sendmsg)
+strong_alias(__libc_sendmsg,sendmsg)
 libc_hidden_def(sendmsg)
 libc_hidden_def(sendmsg)
 #endif
 #endif
 
 
@@ -305,8 +305,8 @@ ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,
 	return (__socketcall(SYS_SENDTO, args));
 	return (__socketcall(SYS_SENDTO, args));
 }
 }
 #endif
 #endif
-strong_alias(__libc_sendto,sendto)
 libc_hidden_proto(sendto)
 libc_hidden_proto(sendto)
+strong_alias(__libc_sendto,sendto)
 libc_hidden_def(sendto)
 libc_hidden_def(sendto)
 #endif
 #endif
 
 

+ 0 - 1
libc/misc/fnmatch/fnmatch.c

@@ -475,7 +475,6 @@ compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
 libc_hidden_ver (__fnmatch, fnmatch)
 libc_hidden_ver (__fnmatch, fnmatch)
 #  endif
 #  endif
 # else
 # else
-libc_hidden_proto(fnmatch)
 libc_hidden_def(fnmatch)
 libc_hidden_def(fnmatch)
 # endif
 # endif
 
 

+ 28 - 27
libc/misc/glob/glob.c

@@ -15,6 +15,7 @@ License along with this library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 Cambridge, MA 02139, USA.  */
 
 
+#define _GNU_SOURCE
 #include <features.h>
 #include <features.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
@@ -25,7 +26,6 @@ Cambridge, MA 02139, USA.  */
 #include <dirent.h>
 #include <dirent.h>
 #include <malloc.h>
 #include <malloc.h>
 #include <fnmatch.h>
 #include <fnmatch.h>
-#define _GNU_SOURCE
 #include <glob.h>
 #include <glob.h>
 
 
 libc_hidden_proto(memcpy)
 libc_hidden_proto(memcpy)
@@ -40,6 +40,7 @@ libc_hidden_proto(fnmatch)
 libc_hidden_proto(qsort)
 libc_hidden_proto(qsort)
 libc_hidden_proto(lstat)
 libc_hidden_proto(lstat)
 
 
+
 extern __ptr_t (*__glob_opendir_hook) __P ((const char *directory)) attribute_hidden;
 extern __ptr_t (*__glob_opendir_hook) __P ((const char *directory)) attribute_hidden;
 extern void (*__glob_closedir_hook) __P ((__ptr_t stream)) attribute_hidden;
 extern void (*__glob_closedir_hook) __P ((__ptr_t stream)) attribute_hidden;
 extern const char *(*__glob_readdir_hook) __P ((__ptr_t stream)) attribute_hidden;
 extern const char *(*__glob_readdir_hook) __P ((__ptr_t stream)) attribute_hidden;
@@ -53,20 +54,20 @@ static int prefix_array __P ((const char *prefix, char **array, size_t n,
 			      int add_slash));
 			      int add_slash));
 static int collated_compare __P ((const __ptr_t, const __ptr_t));
 static int collated_compare __P ((const __ptr_t, const __ptr_t));
 
 
+libc_hidden_proto(glob_pattern_p)
 #ifdef __GLOB64
 #ifdef __GLOB64
-extern int __glob_pattern_p(const char *pattern, int quote) attribute_hidden;
+libc_hidden_proto(glob64)
+libc_hidden_proto(globfree64)
 libc_hidden_proto(readdir64)
 libc_hidden_proto(readdir64)
 #define __readdir readdir64
 #define __readdir readdir64
 #else
 #else
-extern int __glob (__const char *__restrict __pattern, int __flags,
+libc_hidden_proto(glob)
-		 int (*__errfunc) (__const char *, int),
+libc_hidden_proto(globfree)
-		 glob_t *__restrict __pglob) __THROW attribute_hidden;
-extern void __globfree (glob_t *__pglob) __THROW attribute_hidden;
 #define __readdir readdir
 #define __readdir readdir
 libc_hidden_proto(readdir)
 libc_hidden_proto(readdir)
 /* Return nonzero if PATTERN contains any metacharacters.
 /* Return nonzero if PATTERN contains any metacharacters.
    Metacharacters can be quoted with backslashes if QUOTE is nonzero.  */
    Metacharacters can be quoted with backslashes if QUOTE is nonzero.  */
-int attribute_hidden __glob_pattern_p(const char *pattern, int quote)
+int glob_pattern_p(const char *pattern, int quote)
 {
 {
     const char *p;
     const char *p;
     int open = 0;
     int open = 0;
@@ -95,7 +96,7 @@ int attribute_hidden __glob_pattern_p(const char *pattern, int quote)
 
 
     return 0;
     return 0;
 }
 }
-strong_alias(__glob_pattern_p,glob_pattern_p)
+libc_hidden_def(glob_pattern_p)
 #endif
 #endif
 
 
 
 
@@ -107,8 +108,8 @@ strong_alias(__glob_pattern_p,glob_pattern_p)
    `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
    `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
    Otherwise, `glob' returns zero.  */
-int attribute_hidden
+int
-__glob (pattern, flags, errfunc, pglob)
+glob (pattern, flags, errfunc, pglob)
      const char *pattern;
      const char *pattern;
      int flags;
      int flags;
      int (*errfunc) __P ((const char *, int));
      int (*errfunc) __P ((const char *, int));
@@ -153,7 +154,7 @@ __glob (pattern, flags, errfunc, pglob)
   if (filename[0] == '\0' && dirlen > 1)
   if (filename[0] == '\0' && dirlen > 1)
     /* "pattern/".  Expand "pattern", appending slashes.  */
     /* "pattern/".  Expand "pattern", appending slashes.  */
     {
     {
-      int val = __glob (dirname, flags | GLOB_MARK, errfunc, pglob);
+      int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob);
       if (val == 0)
       if (val == 0)
 	pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK);
 	pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK);
       return val;
       return val;
@@ -167,7 +168,7 @@ __glob (pattern, flags, errfunc, pglob)
 
 
   oldcount = pglob->gl_pathc;
   oldcount = pglob->gl_pathc;
 
 
-  if (__glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE)))
+  if (glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE)))
     {
     {
       /* The directory name contains metacharacters, so we
       /* The directory name contains metacharacters, so we
 	 have to glob for the directory, and then glob for
 	 have to glob for the directory, and then glob for
@@ -175,7 +176,7 @@ __glob (pattern, flags, errfunc, pglob)
       glob_t dirs;
       glob_t dirs;
       register int i;
       register int i;
 
 
-      status = __glob (dirname,
+      status = glob (dirname,
 		     ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) |
 		     ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) |
 		      GLOB_NOSORT),
 		      GLOB_NOSORT),
 		     errfunc, &dirs);
 		     errfunc, &dirs);
@@ -196,8 +197,8 @@ __glob (pattern, flags, errfunc, pglob)
 
 
 	    if (interrupt_state)
 	    if (interrupt_state)
 	      {
 	      {
-		__globfree (&dirs);
+		globfree (&dirs);
-		__globfree (&files);
+		globfree (&files);
 		return GLOB_ABEND;
 		return GLOB_ABEND;
 	      }
 	      }
 	  }
 	  }
@@ -213,8 +214,8 @@ __glob (pattern, flags, errfunc, pglob)
 
 
 	  if (status != 0)
 	  if (status != 0)
 	    {
 	    {
-	      __globfree (&dirs);
+	      globfree (&dirs);
-	      __globfree (pglob);
+	      globfree (pglob);
 	      return status;
 	      return status;
 	    }
 	    }
 
 
@@ -224,8 +225,8 @@ __glob (pattern, flags, errfunc, pglob)
 			    pglob->gl_pathc - oldcount,
 			    pglob->gl_pathc - oldcount,
 			    flags & GLOB_MARK))
 			    flags & GLOB_MARK))
 	    {
 	    {
-	      __globfree (&dirs);
+	      globfree (&dirs);
-	      __globfree (pglob);
+	      globfree (pglob);
 	      return GLOB_NOSPACE;
 	      return GLOB_NOSPACE;
 	    }
 	    }
 	}
 	}
@@ -284,7 +285,7 @@ __glob (pattern, flags, errfunc, pglob)
 			    pglob->gl_pathc - oldcount,
 			    pglob->gl_pathc - oldcount,
 			    flags & GLOB_MARK))
 			    flags & GLOB_MARK))
 	    {
 	    {
-	      __globfree (pglob);
+	      globfree (pglob);
 	      return GLOB_NOSPACE;
 	      return GLOB_NOSPACE;
 	    }
 	    }
 	}
 	}
@@ -311,15 +312,15 @@ __glob (pattern, flags, errfunc, pglob)
   return 0;
   return 0;
 }
 }
 #ifdef __GLOB64
 #ifdef __GLOB64
-strong_alias(__glob64,glob64)
+libc_hidden_def(glob64)
 #else
 #else
-strong_alias(__glob,glob)
+libc_hidden_def(glob)
 #endif
 #endif
 
 
 
 
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
-void attribute_hidden
+void
-__globfree (pglob)
+globfree (pglob)
      register glob_t *pglob;
      register glob_t *pglob;
 {
 {
   if (pglob->gl_pathv != NULL)
   if (pglob->gl_pathv != NULL)
@@ -332,9 +333,9 @@ __globfree (pglob)
     }
     }
 }
 }
 #ifdef __GLOB64
 #ifdef __GLOB64
-strong_alias(__globfree64,globfree64)
+libc_hidden_def(globfree64)
 #else
 #else
-strong_alias(__globfree,globfree)
+libc_hidden_def(globfree)
 #endif
 #endif
 
 
 
 
@@ -432,7 +433,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
 	return GLOB_ABORTED;
 	return GLOB_ABORTED;
     }
     }
 
 
-  meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
+  meta = glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
 
 
   if (meta)
   if (meta)
     flags |= GLOB_MAGCHAR;
     flags |= GLOB_MAGCHAR;

+ 7 - 9
libc/misc/glob/glob64.c

@@ -1,3 +1,10 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define _GNU_SOURCE
 #include <features.h>
 #include <features.h>
 
 
 #ifdef __UCLIBC_HAS_LFS__
 #ifdef __UCLIBC_HAS_LFS__
@@ -18,20 +25,11 @@
 #include <glob.h>
 #include <glob.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 
 
-
-extern int __glob64 (__const char *__restrict __pattern, int __flags,
-		   int (*__errfunc) (__const char *, int),
-		   glob64_t *__restrict __pglob) __THROW attribute_hidden;
-extern void __globfree (glob_t *__pglob) __THROW attribute_hidden;
-extern void __globfree64 (glob64_t *__pglob) __THROW attribute_hidden;
 #define dirent dirent64
 #define dirent dirent64
 
 
 #define glob_t glob64_t
 #define glob_t glob64_t
-#define __glob(pattern, flags, errfunc, pglob) \
-  __glob64 (pattern, flags, errfunc, pglob)
 #define glob(pattern, flags, errfunc, pglob) \
 #define glob(pattern, flags, errfunc, pglob) \
   glob64 (pattern, flags, errfunc, pglob)
   glob64 (pattern, flags, errfunc, pglob)
-#define __globfree(pglob) __globfree64 (pglob)
 #define globfree(pglob) globfree64 (pglob)
 #define globfree(pglob) globfree64 (pglob)
 
 
 #undef stat
 #undef stat

+ 13 - 10
libc/misc/ttyent/getttyent.c

@@ -98,7 +98,8 @@ static char * value(register char *p)
     return ((p = strchr(p, '=')) ? ++p : NULL);
     return ((p = strchr(p, '=')) ? ++p : NULL);
 }
 }
 
 
-int attribute_hidden __setttyent(void)
+libc_hidden_proto(setttyent)
+int setttyent(void)
 {
 {
 
 
     if (tf) {
     if (tf) {
@@ -113,15 +114,16 @@ int attribute_hidden __setttyent(void)
     }
     }
     return (0);
     return (0);
 }
 }
-strong_alias(__setttyent,setttyent)
+libc_hidden_def(setttyent)
 
 
-struct ttyent attribute_hidden * __getttyent(void)
+libc_hidden_proto(getttyent)
+struct ttyent * getttyent(void)
 {
 {
     register int c;
     register int c;
     register char *p;
     register char *p;
     static char *line = NULL;
     static char *line = NULL;
 
 
-    if (!tf && !__setttyent())
+    if (!tf && !setttyent())
 	return (NULL);
 	return (NULL);
 
 
     if (!line) {
     if (!line) {
@@ -191,9 +193,10 @@ struct ttyent attribute_hidden * __getttyent(void)
 	*p = '\0';
 	*p = '\0';
     return (&tty);
     return (&tty);
 }
 }
-strong_alias(__getttyent,getttyent)
+libc_hidden_def(getttyent)
 
 
-int attribute_hidden __endttyent(void)
+libc_hidden_proto(endttyent)
+int endttyent(void)
 {
 {
     int rval;
     int rval;
 
 
@@ -204,16 +207,16 @@ int attribute_hidden __endttyent(void)
     }
     }
     return (1);
     return (1);
 }
 }
-strong_alias(__endttyent,endttyent)
+libc_hidden_def(endttyent)
 
 
 struct ttyent * getttynam(const char *tty)
 struct ttyent * getttynam(const char *tty)
 {
 {
     register struct ttyent *t;
     register struct ttyent *t;
 
 
-    __setttyent();
+    setttyent();
-    while ((t = __getttyent()))
+    while ((t = getttyent()))
 	if (!strcmp(tty, t->ty_name))
 	if (!strcmp(tty, t->ty_name))
 	    break;
 	    break;
-    __endttyent();
+    endttyent();
     return (t);
     return (t);
 }
 }

+ 4 - 3
libc/misc/utmp/utent.c

@@ -112,7 +112,8 @@ struct utmp *getutent(void)
 }
 }
 
 
 /* Locking is done in __getutent */
 /* Locking is done in __getutent */
-struct utmp attribute_hidden *__getutid (const struct utmp *utmp_entry)
+libc_hidden_proto(getutid)
+struct utmp *getutid (const struct utmp *utmp_entry)
 {
 {
     struct utmp *lutmp;
     struct utmp *lutmp;
 
 
@@ -137,7 +138,7 @@ struct utmp attribute_hidden *__getutid (const struct utmp *utmp_entry)
 
 
     return NULL;
     return NULL;
 }
 }
-strong_alias(__getutid,getutid)
+libc_hidden_def(getutid)
 
 
 /* Locking is done in __getutent */
 /* Locking is done in __getutent */
 struct utmp *getutline(const struct utmp *utmp_entry)
 struct utmp *getutline(const struct utmp *utmp_entry)
@@ -162,7 +163,7 @@ struct utmp *pututline (const struct utmp *utmp_entry)
        the file pointer where they want it, everything will work out. */
        the file pointer where they want it, everything will work out. */
     lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
     lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 
 
-    if (__getutid(utmp_entry) != NULL) {
+    if (getutid(utmp_entry) != NULL) {
 	lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 	lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
 	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
 	    return NULL;
 	    return NULL;

+ 3 - 8
libc/misc/wchar/wstdio.c

@@ -56,6 +56,9 @@
 #include <errno.h>
 #include <errno.h>
 #include <assert.h>
 #include <assert.h>
 
 
+libc_hidden_proto(fgetwc_unlocked)
+libc_hidden_proto(fputwc_unlocked)
+
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
 
 
 #ifdef __BCC__
 #ifdef __BCC__
@@ -259,7 +262,6 @@ UNLOCKED(wint_t,fgetwc,(register FILE *stream),(stream))
 
 
 	return wi;
 	return wi;
 }
 }
-libc_hidden_proto(fgetwc_unlocked)
 libc_hidden_def(fgetwc_unlocked)
 libc_hidden_def(fgetwc_unlocked)
 
 
 strong_alias(fgetwc_unlocked,getwc_unlocked)
 strong_alias(fgetwc_unlocked,getwc_unlocked)
@@ -269,8 +271,6 @@ strong_alias(fgetwc,getwc)
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_getwchar
 #ifdef L_getwchar
 
 
-libc_hidden_proto(fgetwc_unlocked)
-
 UNLOCKED_STREAM(wint_t,getwchar,(void),(),stdin)
 UNLOCKED_STREAM(wint_t,getwchar,(void),(),stdin)
 {
 {
 	register FILE *stream = stdin; /* This helps bcc optimize. */
 	register FILE *stream = stdin; /* This helps bcc optimize. */
@@ -282,8 +282,6 @@ UNLOCKED_STREAM(wint_t,getwchar,(void),(),stdin)
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_fgetws
 #ifdef L_fgetws
 
 
-libc_hidden_proto(fgetwc_unlocked)
-
 UNLOCKED(wchar_t *,fgetws,(wchar_t *__restrict ws, int n,
 UNLOCKED(wchar_t *,fgetws,(wchar_t *__restrict ws, int n,
 						   FILE *__restrict stream),(ws, n, stream))
 						   FILE *__restrict stream),(ws, n, stream))
 {
 {
@@ -333,7 +331,6 @@ UNLOCKED(wint_t,fputwc,(wchar_t wc, FILE *stream),(wc, stream))
 		? wc : WEOF;
 		? wc : WEOF;
 #endif
 #endif
 }
 }
-libc_hidden_proto(fputwc_unlocked)
 libc_hidden_def(fputwc_unlocked)
 libc_hidden_def(fputwc_unlocked)
 
 
 strong_alias(fputwc_unlocked,putwc_unlocked)
 strong_alias(fputwc_unlocked,putwc_unlocked)
@@ -343,8 +340,6 @@ strong_alias(fputwc,putwc)
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_putwchar
 #ifdef L_putwchar
 
 
-libc_hidden_proto(fputwc_unlocked)
-
 UNLOCKED_STREAM(wint_t,putwchar,(wchar_t wc),(wc),stdout)
 UNLOCKED_STREAM(wint_t,putwchar,(wchar_t wc),(wc),stdout)
 {
 {
 	register FILE *stream = stdout; /* This helps bcc optimize. */
 	register FILE *stream = stdout; /* This helps bcc optimize. */

+ 1 - 1
libc/signal/sigaction.c

@@ -104,7 +104,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 #endif
 #endif
 
 
 #ifndef LIBC_SIGACTION
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 libc_hidden_def(sigaction)
 #endif
 #endif

+ 1 - 1
libc/signal/signal.c

@@ -51,6 +51,6 @@ __bsd_signal (int sig, __sighandler_t handler)
   return oact.sa_handler;
   return oact.sa_handler;
 }
 }
 strong_alias(__bsd_signal,bsd_signal)
 strong_alias(__bsd_signal,bsd_signal)
-strong_alias(__bsd_signal,signal)
 libc_hidden_proto(signal)
 libc_hidden_proto(signal)
+strong_alias(__bsd_signal,signal)
 libc_hidden_def(signal)
 libc_hidden_def(signal)

+ 1 - 1
libc/stdio/fflush.c

@@ -130,8 +130,8 @@ int fflush_unlocked(register FILE *stream)
 libc_hidden_def(fflush_unlocked)
 libc_hidden_def(fflush_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fflush_unlocked,fflush)
 libc_hidden_proto(fflush)
 libc_hidden_proto(fflush)
+strong_alias(fflush_unlocked,fflush)
 libc_hidden_def(fflush)
 libc_hidden_def(fflush)
 #endif
 #endif
 
 

+ 6 - 4
libc/stdio/fgetc.c

@@ -75,21 +75,23 @@ int __fgetc_unlocked(FILE *stream)
 }
 }
 libc_hidden_def(__fgetc_unlocked)
 libc_hidden_def(__fgetc_unlocked)
 
 
-strong_alias(__fgetc_unlocked,fgetc_unlocked)
 libc_hidden_proto(fgetc_unlocked)
 libc_hidden_proto(fgetc_unlocked)
+strong_alias(__fgetc_unlocked,fgetc_unlocked)
 libc_hidden_def(fgetc_unlocked)
 libc_hidden_def(fgetc_unlocked)
 
 
-//strong_alias(__fgetc_unlocked,__getc_unlocked)
 //libc_hidden_proto(__getc_unlocked)
 //libc_hidden_proto(__getc_unlocked)
+//strong_alias(__fgetc_unlocked,__getc_unlocked)
 //libc_hidden_def(__getc_unlocked)
 //libc_hidden_def(__getc_unlocked)
-strong_alias(__fgetc_unlocked,getc_unlocked)
+
 libc_hidden_proto(getc_unlocked)
 libc_hidden_proto(getc_unlocked)
+strong_alias(__fgetc_unlocked,getc_unlocked)
 libc_hidden_def(getc_unlocked)
 libc_hidden_def(getc_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(__fgetc_unlocked,fgetc)
 libc_hidden_proto(fgetc)
 libc_hidden_proto(fgetc)
+strong_alias(__fgetc_unlocked,fgetc)
 libc_hidden_def(fgetc)
 libc_hidden_def(fgetc)
+
 strong_alias(__fgetc_unlocked,getc)
 strong_alias(__fgetc_unlocked,getc)
 #endif
 #endif
 
 

+ 1 - 1
libc/stdio/fgets.c

@@ -64,8 +64,8 @@ char *fgets_unlocked(char *__restrict s, int n,
 libc_hidden_def(fgets_unlocked)
 libc_hidden_def(fgets_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fgets_unlocked,fgets)
 libc_hidden_proto(fgets)
 libc_hidden_proto(fgets)
+strong_alias(fgets_unlocked,fgets)
 libc_hidden_def(fgets)
 libc_hidden_def(fgets)
 #endif
 #endif
 
 

+ 3 - 2
libc/stdio/fgetwc.c

@@ -113,9 +113,10 @@ libc_hidden_def(fgetwc_unlocked)
 
 
 strong_alias(fgetwc_unlocked,getwc_unlocked)
 strong_alias(fgetwc_unlocked,getwc_unlocked)
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fgetwc_unlocked,fgetwc)
 libc_hidden_proto(fgetwc)
 libc_hidden_proto(fgetwc)
+strong_alias(fgetwc_unlocked,fgetwc)
 libc_hidden_def(fgetwc)
 libc_hidden_def(fgetwc)
+
 strong_alias(fgetwc_unlocked,getwc)
 strong_alias(fgetwc_unlocked,getwc)
 #endif
 #endif
 
 
@@ -136,6 +137,6 @@ wint_t fgetwc(register FILE *stream)
 	return retval;
 	return retval;
 }
 }
 libc_hidden_def(fgetwc)
 libc_hidden_def(fgetwc)
-strong_alias(fgetwc,getwc)
 
 
+strong_alias(fgetwc,getwc)
 #endif
 #endif

+ 1 - 1
libc/stdio/fileno.c

@@ -25,8 +25,8 @@ int fileno_unlocked(register FILE *stream)
 libc_hidden_def(fileno_unlocked)
 libc_hidden_def(fileno_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fileno_unlocked,fileno)
 libc_hidden_proto(fileno)
 libc_hidden_proto(fileno)
+strong_alias(fileno_unlocked,fileno)
 libc_hidden_def(fileno)
 libc_hidden_def(fileno)
 #endif
 #endif
 
 

+ 3 - 3
libc/stdio/fputc.c

@@ -74,14 +74,14 @@ libc_hidden_def(__fputc_unlocked)
 
 
 strong_alias(__fputc_unlocked,fputc_unlocked)
 strong_alias(__fputc_unlocked,fputc_unlocked)
 
 
-strong_alias(__fputc_unlocked,putc_unlocked)
 libc_hidden_proto(putc_unlocked)
 libc_hidden_proto(putc_unlocked)
+strong_alias(__fputc_unlocked,putc_unlocked)
 libc_hidden_def(putc_unlocked)
 libc_hidden_def(putc_unlocked)
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
 strong_alias(__fputc_unlocked,fputc)
 strong_alias(__fputc_unlocked,fputc)
 
 
-strong_alias(__fputc_unlocked,putc)
 libc_hidden_proto(putc)
 libc_hidden_proto(putc)
+strong_alias(__fputc_unlocked,putc)
 libc_hidden_def(putc)
 libc_hidden_def(putc)
 #endif
 #endif
 
 
@@ -102,8 +102,8 @@ int fputc(int c, register FILE *stream)
 }
 }
 libc_hidden_def(fputc)
 libc_hidden_def(fputc)
 
 
-strong_alias(fputc,putc)
 libc_hidden_proto(putc)
 libc_hidden_proto(putc)
+strong_alias(fputc,putc)
 libc_hidden_def(putc)
 libc_hidden_def(putc)
 
 
 #endif
 #endif

+ 1 - 1
libc/stdio/fputs.c

@@ -29,8 +29,8 @@ int fputs_unlocked(register const char * __restrict s,
 libc_hidden_def(fputs_unlocked)
 libc_hidden_def(fputs_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fputs_unlocked,fputs)
 libc_hidden_proto(fputs)
 libc_hidden_proto(fputs)
+strong_alias(fputs_unlocked,fputs)
 libc_hidden_def(fputs)
 libc_hidden_def(fputs)
 #endif
 #endif
 
 

+ 1 - 1
libc/stdio/fputws.c

@@ -23,8 +23,8 @@ int fputws_unlocked(const wchar_t *__restrict ws,
 libc_hidden_def(fputws_unlocked)
 libc_hidden_def(fputws_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fputws_unlocked,fputws)
 libc_hidden_proto(fputws)
 libc_hidden_proto(fputws)
+strong_alias(fputws_unlocked,fputws)
 libc_hidden_def(fputws)
 libc_hidden_def(fputws)
 #endif
 #endif
 
 

+ 1 - 1
libc/stdio/fread.c

@@ -90,8 +90,8 @@ size_t fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb,
 libc_hidden_def(fread_unlocked)
 libc_hidden_def(fread_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fread_unlocked,fread)
 libc_hidden_proto(fread)
 libc_hidden_proto(fread)
+strong_alias(fread_unlocked,fread)
 libc_hidden_def(fread)
 libc_hidden_def(fread)
 #endif
 #endif
 
 

+ 1 - 1
libc/stdio/fwrite.c

@@ -38,8 +38,8 @@ size_t fwrite_unlocked(const void * __restrict ptr, size_t size,
 libc_hidden_def(fwrite_unlocked)
 libc_hidden_def(fwrite_unlocked)
 
 
 #ifndef __UCLIBC_HAS_THREADS__
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fwrite_unlocked,fwrite)
 libc_hidden_proto(fwrite)
 libc_hidden_proto(fwrite)
+strong_alias(fwrite_unlocked,fwrite)
 libc_hidden_def(fwrite)
 libc_hidden_def(fwrite)
 #endif
 #endif
 
 

+ 8 - 5
libc/stdlib/stdlib.c

@@ -286,8 +286,11 @@ long atol(const char *nptr)
 libc_hidden_def(atol)
 libc_hidden_def(atol)
 
 
 #if UINT_MAX == ULONG_MAX
 #if UINT_MAX == ULONG_MAX
-strong_alias(atol,atoi)
+/* psm: need to redefine atoi here */
+#undef atoi
+extern long int atoi (__const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur;
 libc_hidden_proto(atoi)
 libc_hidden_proto(atoi)
+strong_alias(atol,atoi)
 libc_hidden_def(atoi)
 libc_hidden_def(atoi)
 #endif
 #endif
 
 
@@ -327,8 +330,8 @@ strong_alias(strtol,strtoimax)
 #endif
 #endif
 
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
 libc_hidden_proto(__XL_NPP(strtoll))
 libc_hidden_proto(__XL_NPP(strtoll))
+strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
 libc_hidden_def(__XL_NPP(strtoll))
 libc_hidden_def(__XL_NPP(strtoll))
 #endif
 #endif
 
 
@@ -375,8 +378,8 @@ strong_alias(strtoul,strtoumax)
 #endif
 #endif
 
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
 libc_hidden_proto(__XL_NPP(strtoull))
 libc_hidden_proto(__XL_NPP(strtoull))
+strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
 libc_hidden_def(__XL_NPP(strtoull))
 libc_hidden_def(__XL_NPP(strtoull))
 #endif
 #endif
 
 
@@ -1015,8 +1018,8 @@ strong_alias(wcstol,wcstoimax)
 #endif
 #endif
 
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
 libc_hidden_proto(__XL_NPP(wcstoll))
 libc_hidden_proto(__XL_NPP(wcstoll))
+strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
 libc_hidden_def(__XL_NPP(wcstoll))
 libc_hidden_def(__XL_NPP(wcstoll))
 #endif
 #endif
 
 
@@ -1063,8 +1066,8 @@ strong_alias(wcstoul,wcstoumax)
 #endif
 #endif
 
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
 libc_hidden_proto(__XL_NPP(wcstoull))
 libc_hidden_proto(__XL_NPP(wcstoull))
+strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
 libc_hidden_def(__XL_NPP(wcstoull))
 libc_hidden_def(__XL_NPP(wcstoull))
 #endif
 #endif
 
 

+ 1 - 1
libc/string/generic/strcmp.c

@@ -44,7 +44,7 @@ int strcmp (const char *p1, const char *p2)
 libc_hidden_def(strcmp)
 libc_hidden_def(strcmp)
 
 
 #ifndef __UCLIBC_HAS_LOCALE__
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(strcmp,strcoll)
 libc_hidden_proto(strcoll)
 libc_hidden_proto(strcoll)
+strong_alias(strcmp,strcoll)
 libc_hidden_def(strcoll)
 libc_hidden_def(strcoll)
 #endif
 #endif

+ 1 - 1
libc/string/i386/strcmp.c

@@ -55,7 +55,7 @@ int strcmp(const char *cs, const char *ct)
 libc_hidden_def(strcmp)
 libc_hidden_def(strcmp)
 
 
 #ifndef __UCLIBC_HAS_LOCALE__
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(strcmp,strcoll)
 libc_hidden_proto(strcoll)
 libc_hidden_proto(strcoll)
+strong_alias(strcmp,strcoll)
 libc_hidden_def(strcoll)
 libc_hidden_def(strcoll)
 #endif
 #endif

+ 1 - 1
libc/string/strcmp.c

@@ -40,7 +40,7 @@ int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
 libc_hidden_def(Wstrcmp)
 libc_hidden_def(Wstrcmp)
 
 
 #ifndef __UCLIBC_HAS_LOCALE__
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(Wstrcmp,Wstrcoll)
 libc_hidden_proto(Wstrcoll)
 libc_hidden_proto(Wstrcoll)
+strong_alias(Wstrcmp,Wstrcoll)
 libc_hidden_def(Wstrcoll)
 libc_hidden_def(Wstrcoll)
 #endif
 #endif

+ 1 - 1
libc/string/strlcpy.c

@@ -50,8 +50,8 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
 #ifndef WANT_WIDE
 #ifndef WANT_WIDE
 libc_hidden_def(strlcpy)
 libc_hidden_def(strlcpy)
 #ifndef __UCLIBC_HAS_LOCALE__
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(strlcpy,strxfrm)
 libc_hidden_proto(strxfrm)
 libc_hidden_proto(strxfrm)
+strong_alias(strlcpy,strxfrm)
 libc_hidden_def(strxfrm)
 libc_hidden_def(strxfrm)
 #endif
 #endif
 #else
 #else

+ 2 - 0
libc/string/strncmp.c

@@ -37,4 +37,6 @@ int Wstrncmp(register const Wchar *s1, register const Wchar *s2, size_t n)
 	return r;
 	return r;
 #endif
 #endif
 }
 }
+#ifndef WANT_WIDE
 libc_hidden_def(strncmp)
 libc_hidden_def(strncmp)
+#endif

+ 2 - 0
libc/string/strncpy.c

@@ -34,4 +34,6 @@ Wchar *Wstrncpy(Wchar * __restrict s1, register const Wchar * __restrict s2,
 	
 	
 	return s1;
 	return s1;
 }
 }
+#ifndef WANT_WIDE
 libc_hidden_def(strncpy)
 libc_hidden_def(strncpy)
+#endif

+ 1 - 1
libc/string/strrchr.c

@@ -27,7 +27,7 @@ Wchar *Wstrrchr(register const  Wchar *s, Wint c)
 
 
 	return (Wchar *) p;			/* silence the warning */
 	return (Wchar *) p;			/* silence the warning */
 }
 }
-libc_hidden_def(strrchr)
 #ifndef WANT_WIDE
 #ifndef WANT_WIDE
+libc_hidden_def(strrchr)
 strong_alias(strrchr,rindex)
 strong_alias(strrchr,rindex)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/arm/sigaction.c

@@ -126,7 +126,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
 #endif
 #endif
 
 
 #ifndef LIBC_SIGACTION
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 libc_hidden_def(sigaction)
 #endif
 #endif

+ 2 - 2
libc/sysdeps/linux/common/__syscall_fcntl.c

@@ -48,12 +48,12 @@ int __libc_fcntl(int fd, int cmd, ...)
 }
 }
 libc_hidden_def(__libc_fcntl)
 libc_hidden_def(__libc_fcntl)
 
 
-strong_alias(__libc_fcntl,fcntl)
 libc_hidden_proto(fcntl)
 libc_hidden_proto(fcntl)
+strong_alias(__libc_fcntl,fcntl)
 libc_hidden_def(fcntl)
 libc_hidden_def(fcntl)
 #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__
 #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__
 strong_alias(__libc_fcntl,__libc_fcntl64)
 strong_alias(__libc_fcntl,__libc_fcntl64)
-strong_alias(__libc_fcntl,fcntl64)
 libc_hidden_proto(fcntl64)
 libc_hidden_proto(fcntl64)
+strong_alias(__libc_fcntl,fcntl64)
 libc_hidden_def(fcntl64)
 libc_hidden_def(fcntl64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/__syscall_fcntl64.c

@@ -30,7 +30,7 @@ int __libc_fcntl64(int fd, int cmd, ...)
 }
 }
 libc_hidden_def(__libc_fcntl64)
 libc_hidden_def(__libc_fcntl64)
 
 
-strong_alias(__libc_fcntl64,fcntl64)
 libc_hidden_proto(fcntl64)
 libc_hidden_proto(fcntl64)
+strong_alias(__libc_fcntl64,fcntl64)
 libc_hidden_def(fcntl64)
 libc_hidden_def(fcntl64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/close.c

@@ -12,6 +12,6 @@
 
 
 #define __NR___libc_close __NR_close
 #define __NR___libc_close __NR_close
 _syscall1(int, __libc_close, int, fd);
 _syscall1(int, __libc_close, int, fd);
-strong_alias(__libc_close,close)
 libc_hidden_proto(close)
 libc_hidden_proto(close)
+strong_alias(__libc_close,close)
 libc_hidden_def(close)
 libc_hidden_def(close)

+ 1 - 1
libc/sysdeps/linux/common/fork.c

@@ -14,8 +14,8 @@
 #ifdef __NR_fork
 #ifdef __NR_fork
 #define __NR___libc_fork __NR_fork
 #define __NR___libc_fork __NR_fork
 _syscall0(pid_t, __libc_fork);
 _syscall0(pid_t, __libc_fork);
-strong_alias(__libc_fork,fork)
 libc_hidden_proto(fork)
 libc_hidden_proto(fork)
+strong_alias(__libc_fork,fork)
 libc_hidden_def(fork)
 libc_hidden_def(fork)
 #endif
 #endif
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/fstat.c

@@ -37,7 +37,7 @@ int fstat(int fd, struct stat *buf)
 libc_hidden_def(fstat)
 libc_hidden_def(fstat)
 
 
 #if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
 #if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(fstat,fstat64)
 libc_hidden_proto(fstat64)
 libc_hidden_proto(fstat64)
+strong_alias(fstat,fstat64)
 libc_hidden_def(fstat64)
 libc_hidden_def(fstat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/getpagesize.c

@@ -43,6 +43,6 @@ int __getpagesize(void)
 #endif	/* NBPG.  */
 #endif	/* NBPG.  */
 #endif	/* EXEC_PAGESIZE.  */
 #endif	/* EXEC_PAGESIZE.  */
 }
 }
-strong_alias(__getpagesize,getpagesize)
 libc_hidden_proto(getpagesize)
 libc_hidden_proto(getpagesize)
+strong_alias(__getpagesize,getpagesize)
 libc_hidden_def(getpagesize)
 libc_hidden_def(getpagesize)

+ 1 - 1
libc/sysdeps/linux/common/getpid.c

@@ -15,6 +15,6 @@
 #endif
 #endif
 #define __NR___libc_getpid __NR_getpid
 #define __NR___libc_getpid __NR_getpid
 _syscall0(pid_t, __libc_getpid);
 _syscall0(pid_t, __libc_getpid);
-strong_alias(__libc_getpid, getpid)
 libc_hidden_proto(getpid)
 libc_hidden_proto(getpid)
+strong_alias(__libc_getpid, getpid)
 libc_hidden_def(getpid)
 libc_hidden_def(getpid)

+ 2 - 1
libc/sysdeps/linux/common/llseek.c

@@ -17,6 +17,7 @@
 # undef __USE_FILE_OFFSET64
 # undef __USE_FILE_OFFSET64
 #endif
 #endif
 #include <errno.h>
 #include <errno.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
 #include <sys/syscall.h>
 
 
@@ -44,7 +45,7 @@ loff_t __libc_lseek64(int fd, loff_t offset, int whence)
 	return(loff_t)(__libc_lseek(fd, (off_t) (offset), whence));
 	return(loff_t)(__libc_lseek(fd, (off_t) (offset), whence));
 }
 }
 #endif
 #endif
-strong_alias(__libc_lseek64,lseek64)
 libc_hidden_proto(lseek64)
 libc_hidden_proto(lseek64)
+strong_alias(__libc_lseek64,lseek64)
 libc_hidden_def(lseek64)
 libc_hidden_def(lseek64)
 //strong_alias(__libc_lseek64,_llseek)
 //strong_alias(__libc_lseek64,_llseek)

+ 1 - 1
libc/sysdeps/linux/common/longjmp.c

@@ -47,4 +47,4 @@ void __libc_longjmp (sigjmp_buf env, int val)
 strong_alias(__libc_longjmp,longjmp)
 strong_alias(__libc_longjmp,longjmp)
 strong_alias(__libc_longjmp,siglongjmp)
 strong_alias(__libc_longjmp,siglongjmp)
 strong_alias(__libc_longjmp,__libc_siglongjmp)
 strong_alias(__libc_longjmp,__libc_siglongjmp)
-weak_alias (__libc_longjmp, _longjmp)
+strong_alias(__libc_longjmp,_longjmp)

+ 1 - 1
libc/sysdeps/linux/common/lseek.c

@@ -17,6 +17,6 @@ libc_hidden_proto(__libc_lseek)
 _syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence);
 _syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence);
 libc_hidden_def(__libc_lseek)
 libc_hidden_def(__libc_lseek)
 
 
-strong_alias(__libc_lseek,lseek)
 libc_hidden_proto(lseek)
 libc_hidden_proto(lseek)
+strong_alias(__libc_lseek,lseek)
 libc_hidden_def(lseek)
 libc_hidden_def(lseek)

+ 1 - 1
libc/sysdeps/linux/common/lstat.c

@@ -38,7 +38,7 @@ int lstat(const char *file_name, struct stat *buf)
 libc_hidden_def(lstat)
 libc_hidden_def(lstat)
 
 
 #if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
 #if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(lstat,lstat64)
 libc_hidden_proto(lstat64)
 libc_hidden_proto(lstat64)
+strong_alias(lstat,lstat64)
 libc_hidden_def(lstat64)
 libc_hidden_def(lstat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/nanosleep.c

@@ -14,6 +14,6 @@
 #define __NR___libc_nanosleep __NR_nanosleep
 #define __NR___libc_nanosleep __NR_nanosleep
 _syscall2(int, __libc_nanosleep, const struct timespec *, req,
 _syscall2(int, __libc_nanosleep, const struct timespec *, req,
 		  struct timespec *, rem);
 		  struct timespec *, rem);
-strong_alias(__libc_nanosleep,nanosleep)
 libc_hidden_proto(nanosleep)
 libc_hidden_proto(nanosleep)
+strong_alias(__libc_nanosleep,nanosleep)
 libc_hidden_def(nanosleep)
 libc_hidden_def(nanosleep)

+ 1 - 1
libc/sysdeps/linux/common/open.c

@@ -38,8 +38,8 @@ int __libc_open(const char *file, int flags, ...)
 }
 }
 libc_hidden_def(__libc_open)
 libc_hidden_def(__libc_open)
 
 
-strong_alias(__libc_open,open)
 libc_hidden_proto(open)
 libc_hidden_proto(open)
+strong_alias(__libc_open,open)
 libc_hidden_def(open)
 libc_hidden_def(open)
 
 
 int creat(const char *file, mode_t mode)
 int creat(const char *file, mode_t mode)

+ 1 - 1
libc/sysdeps/linux/common/open64.c

@@ -33,7 +33,7 @@ int __libc_open64 (const char *file, int oflag, ...)
 
 
   return __libc_open(file, oflag | O_LARGEFILE, mode);
   return __libc_open(file, oflag | O_LARGEFILE, mode);
 }
 }
-strong_alias(__libc_open64,open64)
 libc_hidden_proto(open64)
 libc_hidden_proto(open64)
+strong_alias(__libc_open64,open64)
 libc_hidden_def(open64)
 libc_hidden_def(open64)
 #endif /* __UCLIBC_HAS_LFS__ */
 #endif /* __UCLIBC_HAS_LFS__ */

+ 1 - 1
libc/sysdeps/linux/common/read.c

@@ -12,6 +12,6 @@
 
 
 #define __NR___libc_read __NR_read
 #define __NR___libc_read __NR_read
 _syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
 _syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
-strong_alias(__libc_read,read)
 libc_hidden_proto(read)
 libc_hidden_proto(read)
+strong_alias(__libc_read,read)
 libc_hidden_def(read)
 libc_hidden_def(read)

+ 1 - 1
libc/sysdeps/linux/common/stat.c

@@ -39,7 +39,7 @@ int stat(const char *file_name, struct stat *buf)
 libc_hidden_def(stat)
 libc_hidden_def(stat)
 
 
 #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
 #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(stat,stat64)
 libc_hidden_proto(stat64)
 libc_hidden_proto(stat64)
+strong_alias(stat,stat64)
 libc_hidden_def(stat64)
 libc_hidden_def(stat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/common/waitpid.c

@@ -16,6 +16,6 @@ __pid_t __libc_waitpid(__pid_t pid, int *wait_stat, int options)
 {
 {
     return wait4(pid, wait_stat, options, NULL);
     return wait4(pid, wait_stat, options, NULL);
 }
 }
-strong_alias(__libc_waitpid,waitpid)
 libc_hidden_proto(waitpid)
 libc_hidden_proto(waitpid)
+strong_alias(__libc_waitpid,waitpid)
 libc_hidden_def(waitpid)
 libc_hidden_def(waitpid)

+ 1 - 1
libc/sysdeps/linux/common/write.c

@@ -12,8 +12,8 @@
 
 
 #define __NR___libc_write __NR_write
 #define __NR___libc_write __NR_write
 _syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
 _syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
-strong_alias(__libc_write,write)
 libc_hidden_proto(write)
 libc_hidden_proto(write)
+strong_alias(__libc_write,write)
 libc_hidden_def(write)
 libc_hidden_def(write)
 #if 0
 #if 0
 /* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o
 /* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o

+ 1 - 1
libc/sysdeps/linux/cris/fork.c

@@ -14,6 +14,6 @@ SYSCALL__ (__libc_fork, 0)
 	   R0&-1==R0, and the child gets R0&0==0.  */
 	   R0&-1==R0, and the child gets R0&0==0.  */
      /* i dunno what the blurb above is useful for. we just return. */
      /* i dunno what the blurb above is useful for. we just return. */
 __asm__("ret\n\tnop");
 __asm__("ret\n\tnop");
-strong_alias(__libc_fork,fork)
 libc_hidden_proto(fork)
 libc_hidden_proto(fork)
+strong_alias(__libc_fork,fork)
 libc_hidden_def(fork)
 libc_hidden_def(fork)

+ 1 - 1
libc/sysdeps/linux/frv/fstat.c

@@ -30,6 +30,6 @@
 
 
 #define __NR___syscall_fstat __NR_fstat
 #define __NR___syscall_fstat __NR_fstat
 static inline _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf);
 static inline _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf);
-strong_alias(__syscall_fstat,fstat)
 libc_hidden_proto(fstat)
 libc_hidden_proto(fstat)
+strong_alias(__syscall_fstat,fstat)
 libc_hidden_def(fstat)
 libc_hidden_def(fstat)

+ 1 - 1
libc/sysdeps/linux/frv/fstat64.c

@@ -31,7 +31,7 @@
 #if defined __UCLIBC_HAS_LFS__
 #if defined __UCLIBC_HAS_LFS__
 #define __NR___syscall_fstat64 __NR_fstat64
 #define __NR___syscall_fstat64 __NR_fstat64
 static inline _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf);
 static inline _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf);
-strong_alias(__syscall_fstat64,fstat64)
 libc_hidden_proto(fstat64)
 libc_hidden_proto(fstat64)
+strong_alias(__syscall_fstat64,fstat64)
 libc_hidden_def(fstat64)
 libc_hidden_def(fstat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/frv/lstat.c

@@ -30,6 +30,6 @@
 
 
 #define __NR___syscall_lstat __NR_lstat
 #define __NR___syscall_lstat __NR_lstat
 static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf);
 static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf);
-strong_alias(__syscall_lstat,lstat)
 libc_hidden_proto(lstat)
 libc_hidden_proto(lstat)
+strong_alias(__syscall_lstat,lstat)
 libc_hidden_def(lstat)
 libc_hidden_def(lstat)

+ 1 - 1
libc/sysdeps/linux/frv/lstat64.c

@@ -31,7 +31,7 @@
 #if defined __UCLIBC_HAS_LFS__
 #if defined __UCLIBC_HAS_LFS__
 #define __NR___syscall_lstat64 __NR_lstat64
 #define __NR___syscall_lstat64 __NR_lstat64
 static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf);
 static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf);
-strong_alias(__syscall_lstat64,lstat64)
 libc_hidden_proto(lstat64)
 libc_hidden_proto(lstat64)
+strong_alias(__syscall_lstat64,lstat64)
 libc_hidden_def(lstat64)
 libc_hidden_def(lstat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/frv/stat.c

@@ -30,6 +30,6 @@
 
 
 #define __NR___syscall_stat __NR_stat
 #define __NR___syscall_stat __NR_stat
 static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
 static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
-strong_alias(__syscall_stat,stat)
 libc_hidden_proto(stat)
 libc_hidden_proto(stat)
+strong_alias(__syscall_stat,stat)
 libc_hidden_def(stat)
 libc_hidden_def(stat)

+ 1 - 1
libc/sysdeps/linux/frv/stat64.c

@@ -31,7 +31,7 @@
 #if defined __UCLIBC_HAS_LFS__
 #if defined __UCLIBC_HAS_LFS__
 #define __NR___syscall_stat64 __NR_stat64
 #define __NR___syscall_stat64 __NR_stat64
 static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
 static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
-strong_alias(__syscall_stat64,stat64)
 libc_hidden_proto(stat64)
 libc_hidden_proto(stat64)
+strong_alias(__syscall_stat64,stat64)
 libc_hidden_def(stat64)
 libc_hidden_def(stat64)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/i386/sigaction.c

@@ -123,8 +123,8 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
 #endif
 #endif
 
 
 #ifndef LIBC_SIGACTION
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 libc_hidden_def(sigaction)
 #endif
 #endif
 
 

+ 1 - 1
libc/sysdeps/linux/mips/sigaction.c

@@ -114,7 +114,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
 #endif
 #endif
 
 
 #ifndef LIBC_SIGACTION
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 libc_hidden_def(sigaction)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/x86_64/sigaction.c

@@ -120,8 +120,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 #endif
 #endif
 
 
 #ifndef LIBC_SIGACTION
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 libc_hidden_def(sigaction)
 #endif
 #endif
 
 

+ 6 - 5
libpthread/linuxthreads.old/forward.c

@@ -17,13 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
    02111-1307 USA.  */
 
 
-#include <dlfcn.h>
+#include <features.h>
-#include "internals.h"
 #include <stdlib.h>
 #include <stdlib.h>
+#include <dlfcn.h>
 
 
-#include <libc-internal.h>
+/* psm: keep this before internals.h */
+libc_hidden_proto(exit)
 
 
-libc_hidden_def(exit)
+#include "internals.h"
 
 
 /* Pointers to the libc functions.  */
 /* Pointers to the libc functions.  */
 struct pthread_functions __libc_pthread_functions attribute_hidden;
 struct pthread_functions __libc_pthread_functions attribute_hidden;
@@ -103,7 +104,7 @@ FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
 
 
 /* Use an alias to avoid warning, as pthread_exit is declared noreturn.  */
 /* Use an alias to avoid warning, as pthread_exit is declared noreturn.  */
 FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
 FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
-strong_alias (__pthread_exit, pthread_exit);
+strong_alias (__pthread_exit, pthread_exit)
 
 
 
 
 FORWARD (pthread_getschedparam,
 FORWARD (pthread_getschedparam,