Browse Source

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

Peter S. Mazinger 18 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>
 
 libc_hidden_proto(xdr_string)
-libc_hidden_def(xdr_string)
 libc_hidden_proto(xdr_u_int)
 libc_hidden_proto(xdr_array)
 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);
 }
 #endif
-strong_alias(__libc_accept,accept)
 libc_hidden_proto(accept)
+strong_alias(__libc_accept,accept)
 libc_hidden_def(accept)
 #endif
 
@@ -87,8 +87,8 @@ int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
 	return __socketcall(SYS_CONNECT, args);
 }
 #endif
-strong_alias(__libc_connect,connect)
 libc_hidden_proto(connect)
+strong_alias(__libc_connect,connect)
 libc_hidden_def(connect)
 #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));
 }
 #endif
-strong_alias(__libc_recv,recv)
 libc_hidden_proto(recv)
+strong_alias(__libc_recv,recv)
 libc_hidden_def(recv)
 #endif
 
@@ -211,8 +211,8 @@ ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
 	return (__socketcall(SYS_RECVFROM, args));
 }
 #endif
-strong_alias(__libc_recvfrom,recvfrom)
 libc_hidden_proto(recvfrom)
+strong_alias(__libc_recvfrom,recvfrom)
 libc_hidden_def(recvfrom)
 #endif
 
@@ -231,8 +231,8 @@ ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
 	return (__socketcall(SYS_RECVMSG, args));
 }
 #endif
-strong_alias(__libc_recvmsg,recvmsg)
 libc_hidden_proto(recvmsg)
+strong_alias(__libc_recvmsg,recvmsg)
 libc_hidden_def(recvmsg)
 #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));
 }
 #endif
-strong_alias(__libc_send,send)
 libc_hidden_proto(send)
+strong_alias(__libc_send,send)
 libc_hidden_def(send)
 #endif
 
@@ -279,8 +279,8 @@ ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
 	return (__socketcall(SYS_SENDMSG, args));
 }
 #endif
-strong_alias(__libc_sendmsg,sendmsg)
 libc_hidden_proto(sendmsg)
+strong_alias(__libc_sendmsg,sendmsg)
 libc_hidden_def(sendmsg)
 #endif
 
@@ -305,8 +305,8 @@ ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,
 	return (__socketcall(SYS_SENDTO, args));
 }
 #endif
-strong_alias(__libc_sendto,sendto)
 libc_hidden_proto(sendto)
+strong_alias(__libc_sendto,sendto)
 libc_hidden_def(sendto)
 #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)
 #  endif
 # else
-libc_hidden_proto(fnmatch)
 libc_hidden_def(fnmatch)
 # 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,
 Cambridge, MA 02139, USA.  */
 
+#define _GNU_SOURCE
 #include <features.h>
 #include <stdlib.h>
 #include <string.h>
@@ -25,7 +26,6 @@ Cambridge, MA 02139, USA.  */
 #include <dirent.h>
 #include <malloc.h>
 #include <fnmatch.h>
-#define _GNU_SOURCE
 #include <glob.h>
 
 libc_hidden_proto(memcpy)
@@ -40,6 +40,7 @@ libc_hidden_proto(fnmatch)
 libc_hidden_proto(qsort)
 libc_hidden_proto(lstat)
 
+
 extern __ptr_t (*__glob_opendir_hook) __P ((const char *directory)) 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;
@@ -53,20 +54,20 @@ static int prefix_array __P ((const char *prefix, char **array, size_t n,
 			      int add_slash));
 static int collated_compare __P ((const __ptr_t, const __ptr_t));
 
+libc_hidden_proto(glob_pattern_p)
 #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)
 #define __readdir readdir64
 #else
-extern int __glob (__const char *__restrict __pattern, int __flags,
-		 int (*__errfunc) (__const char *, int),
-		 glob_t *__restrict __pglob) __THROW attribute_hidden;
-extern void __globfree (glob_t *__pglob) __THROW attribute_hidden;
+libc_hidden_proto(glob)
+libc_hidden_proto(globfree)
 #define __readdir readdir
 libc_hidden_proto(readdir)
 /* Return nonzero if PATTERN contains any metacharacters.
    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;
     int open = 0;
@@ -95,7 +96,7 @@ int attribute_hidden __glob_pattern_p(const char *pattern, int quote)
 
     return 0;
 }
-strong_alias(__glob_pattern_p,glob_pattern_p)
+libc_hidden_def(glob_pattern_p)
 #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.
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
-int attribute_hidden
-__glob (pattern, flags, errfunc, pglob)
+int
+glob (pattern, flags, errfunc, pglob)
      const char *pattern;
      int flags;
      int (*errfunc) __P ((const char *, int));
@@ -153,7 +154,7 @@ __glob (pattern, flags, errfunc, pglob)
   if (filename[0] == '\0' && dirlen > 1)
     /* "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)
 	pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK);
       return val;
@@ -167,7 +168,7 @@ __glob (pattern, flags, errfunc, pglob)
 
   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
 	 have to glob for the directory, and then glob for
@@ -175,7 +176,7 @@ __glob (pattern, flags, errfunc, pglob)
       glob_t dirs;
       register int i;
 
-      status = __glob (dirname,
+      status = glob (dirname,
 		     ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) |
 		      GLOB_NOSORT),
 		     errfunc, &dirs);
@@ -196,8 +197,8 @@ __glob (pattern, flags, errfunc, pglob)
 
 	    if (interrupt_state)
 	      {
-		__globfree (&dirs);
-		__globfree (&files);
+		globfree (&dirs);
+		globfree (&files);
 		return GLOB_ABEND;
 	      }
 	  }
@@ -213,8 +214,8 @@ __glob (pattern, flags, errfunc, pglob)
 
 	  if (status != 0)
 	    {
-	      __globfree (&dirs);
-	      __globfree (pglob);
+	      globfree (&dirs);
+	      globfree (pglob);
 	      return status;
 	    }
 
@@ -224,8 +225,8 @@ __glob (pattern, flags, errfunc, pglob)
 			    pglob->gl_pathc - oldcount,
 			    flags & GLOB_MARK))
 	    {
-	      __globfree (&dirs);
-	      __globfree (pglob);
+	      globfree (&dirs);
+	      globfree (pglob);
 	      return GLOB_NOSPACE;
 	    }
 	}
@@ -284,7 +285,7 @@ __glob (pattern, flags, errfunc, pglob)
 			    pglob->gl_pathc - oldcount,
 			    flags & GLOB_MARK))
 	    {
-	      __globfree (pglob);
+	      globfree (pglob);
 	      return GLOB_NOSPACE;
 	    }
 	}
@@ -311,15 +312,15 @@ __glob (pattern, flags, errfunc, pglob)
   return 0;
 }
 #ifdef __GLOB64
-strong_alias(__glob64,glob64)
+libc_hidden_def(glob64)
 #else
-strong_alias(__glob,glob)
+libc_hidden_def(glob)
 #endif
 
 
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
-void attribute_hidden
-__globfree (pglob)
+void
+globfree (pglob)
      register glob_t *pglob;
 {
   if (pglob->gl_pathv != NULL)
@@ -332,9 +333,9 @@ __globfree (pglob)
     }
 }
 #ifdef __GLOB64
-strong_alias(__globfree64,globfree64)
+libc_hidden_def(globfree64)
 #else
-strong_alias(__globfree,globfree)
+libc_hidden_def(globfree)
 #endif
 
 
@@ -432,7 +433,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
 	return GLOB_ABORTED;
     }
 
-  meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
+  meta = glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
 
   if (meta)
     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>
 
 #ifdef __UCLIBC_HAS_LFS__
@@ -18,20 +25,11 @@
 #include <glob.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 glob_t glob64_t
-#define __glob(pattern, flags, errfunc, pglob) \
-  __glob64 (pattern, flags, errfunc, pglob)
 #define glob(pattern, flags, errfunc, pglob) \
   glob64 (pattern, flags, errfunc, pglob)
-#define __globfree(pglob) __globfree64 (pglob)
 #define globfree(pglob) globfree64 (pglob)
 
 #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);
 }
 
-int attribute_hidden __setttyent(void)
+libc_hidden_proto(setttyent)
+int setttyent(void)
 {
 
     if (tf) {
@@ -113,15 +114,16 @@ int attribute_hidden __setttyent(void)
     }
     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 char *p;
     static char *line = NULL;
 
-    if (!tf && !__setttyent())
+    if (!tf && !setttyent())
 	return (NULL);
 
     if (!line) {
@@ -191,9 +193,10 @@ struct ttyent attribute_hidden * __getttyent(void)
 	*p = '\0';
     return (&tty);
 }
-strong_alias(__getttyent,getttyent)
+libc_hidden_def(getttyent)
 
-int attribute_hidden __endttyent(void)
+libc_hidden_proto(endttyent)
+int endttyent(void)
 {
     int rval;
 
@@ -204,16 +207,16 @@ int attribute_hidden __endttyent(void)
     }
     return (1);
 }
-strong_alias(__endttyent,endttyent)
+libc_hidden_def(endttyent)
 
 struct ttyent * getttynam(const char *tty)
 {
     register struct ttyent *t;
 
-    __setttyent();
-    while ((t = __getttyent()))
+    setttyent();
+    while ((t = getttyent()))
 	if (!strcmp(tty, t->ty_name))
 	    break;
-    __endttyent();
+    endttyent();
     return (t);
 }

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

@@ -112,7 +112,8 @@ struct utmp *getutent(void)
 }
 
 /* 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;
 
@@ -137,7 +138,7 @@ struct utmp attribute_hidden *__getutid (const struct utmp *utmp_entry)
 
     return NULL;
 }
-strong_alias(__getutid,getutid)
+libc_hidden_def(getutid)
 
 /* Locking is done in __getutent */
 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. */
     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);
 	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
 	    return NULL;

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

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

+ 1 - 1
libc/signal/signal.c

@@ -51,6 +51,6 @@ __bsd_signal (int sig, __sighandler_t handler)
   return oact.sa_handler;
 }
 strong_alias(__bsd_signal,bsd_signal)
-strong_alias(__bsd_signal,signal)
 libc_hidden_proto(signal)
+strong_alias(__bsd_signal,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)
 
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fflush_unlocked,fflush)
 libc_hidden_proto(fflush)
+strong_alias(fflush_unlocked,fflush)
 libc_hidden_def(fflush)
 #endif
 

+ 6 - 4
libc/stdio/fgetc.c

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

+ 1 - 1
libc/stdio/fgets.c

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

+ 3 - 2
libc/stdio/fgetwc.c

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

+ 1 - 1
libc/stdio/fileno.c

@@ -25,8 +25,8 @@ int fileno_unlocked(register FILE *stream)
 libc_hidden_def(fileno_unlocked)
 
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fileno_unlocked,fileno)
 libc_hidden_proto(fileno)
+strong_alias(fileno_unlocked,fileno)
 libc_hidden_def(fileno)
 #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,putc_unlocked)
 libc_hidden_proto(putc_unlocked)
+strong_alias(__fputc_unlocked,putc_unlocked)
 libc_hidden_def(putc_unlocked)
 #ifndef __UCLIBC_HAS_THREADS__
 strong_alias(__fputc_unlocked,fputc)
 
-strong_alias(__fputc_unlocked,putc)
 libc_hidden_proto(putc)
+strong_alias(__fputc_unlocked,putc)
 libc_hidden_def(putc)
 #endif
 
@@ -102,8 +102,8 @@ int fputc(int c, register FILE *stream)
 }
 libc_hidden_def(fputc)
 
-strong_alias(fputc,putc)
 libc_hidden_proto(putc)
+strong_alias(fputc,putc)
 libc_hidden_def(putc)
 
 #endif

+ 1 - 1
libc/stdio/fputs.c

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

+ 1 - 1
libc/stdio/fputws.c

@@ -23,8 +23,8 @@ int fputws_unlocked(const wchar_t *__restrict ws,
 libc_hidden_def(fputws_unlocked)
 
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fputws_unlocked,fputws)
 libc_hidden_proto(fputws)
+strong_alias(fputws_unlocked,fputws)
 libc_hidden_def(fputws)
 #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)
 
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fread_unlocked,fread)
 libc_hidden_proto(fread)
+strong_alias(fread_unlocked,fread)
 libc_hidden_def(fread)
 #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)
 
 #ifndef __UCLIBC_HAS_THREADS__
-strong_alias(fwrite_unlocked,fwrite)
 libc_hidden_proto(fwrite)
+strong_alias(fwrite_unlocked,fwrite)
 libc_hidden_def(fwrite)
 #endif
 

+ 8 - 5
libc/stdlib/stdlib.c

@@ -286,8 +286,11 @@ long atol(const char *nptr)
 libc_hidden_def(atol)
 
 #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)
+strong_alias(atol,atoi)
 libc_hidden_def(atoi)
 #endif
 
@@ -327,8 +330,8 @@ strong_alias(strtol,strtoimax)
 #endif
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
 libc_hidden_proto(__XL_NPP(strtoll))
+strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
 libc_hidden_def(__XL_NPP(strtoll))
 #endif
 
@@ -375,8 +378,8 @@ strong_alias(strtoul,strtoumax)
 #endif
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
 libc_hidden_proto(__XL_NPP(strtoull))
+strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
 libc_hidden_def(__XL_NPP(strtoull))
 #endif
 
@@ -1015,8 +1018,8 @@ strong_alias(wcstol,wcstoimax)
 #endif
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
 libc_hidden_proto(__XL_NPP(wcstoll))
+strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
 libc_hidden_def(__XL_NPP(wcstoll))
 #endif
 
@@ -1063,8 +1066,8 @@ strong_alias(wcstoul,wcstoumax)
 #endif
 
 #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
-strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
 libc_hidden_proto(__XL_NPP(wcstoull))
+strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
 libc_hidden_def(__XL_NPP(wcstoull))
 #endif
 

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

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

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

@@ -55,7 +55,7 @@ int strcmp(const char *cs, const char *ct)
 libc_hidden_def(strcmp)
 
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(strcmp,strcoll)
 libc_hidden_proto(strcoll)
+strong_alias(strcmp,strcoll)
 libc_hidden_def(strcoll)
 #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)
 
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(Wstrcmp,Wstrcoll)
 libc_hidden_proto(Wstrcoll)
+strong_alias(Wstrcmp,Wstrcoll)
 libc_hidden_def(Wstrcoll)
 #endif

+ 1 - 1
libc/string/strlcpy.c

@@ -50,8 +50,8 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
 #ifndef WANT_WIDE
 libc_hidden_def(strlcpy)
 #ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(strlcpy,strxfrm)
 libc_hidden_proto(strxfrm)
+strong_alias(strlcpy,strxfrm)
 libc_hidden_def(strxfrm)
 #endif
 #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;
 #endif
 }
+#ifndef WANT_WIDE
 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;
 }
+#ifndef WANT_WIDE
 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 */
 }
-libc_hidden_def(strrchr)
 #ifndef WANT_WIDE
+libc_hidden_def(strrchr)
 strong_alias(strrchr,rindex)
 #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
 
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 #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)
 
-strong_alias(__libc_fcntl,fcntl)
 libc_hidden_proto(fcntl)
+strong_alias(__libc_fcntl,fcntl)
 libc_hidden_def(fcntl)
 #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__
 strong_alias(__libc_fcntl,__libc_fcntl64)
-strong_alias(__libc_fcntl,fcntl64)
 libc_hidden_proto(fcntl64)
+strong_alias(__libc_fcntl,fcntl64)
 libc_hidden_def(fcntl64)
 #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)
 
-strong_alias(__libc_fcntl64,fcntl64)
 libc_hidden_proto(fcntl64)
+strong_alias(__libc_fcntl64,fcntl64)
 libc_hidden_def(fcntl64)
 #endif

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

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

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

@@ -14,8 +14,8 @@
 #ifdef __NR_fork
 #define __NR___libc_fork __NR_fork
 _syscall0(pid_t, __libc_fork);
-strong_alias(__libc_fork,fork)
 libc_hidden_proto(fork)
+strong_alias(__libc_fork,fork)
 libc_hidden_def(fork)
 #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)
 
 #if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(fstat,fstat64)
 libc_hidden_proto(fstat64)
+strong_alias(fstat,fstat64)
 libc_hidden_def(fstat64)
 #endif

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

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

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

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

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

@@ -17,6 +17,7 @@
 # undef __USE_FILE_OFFSET64
 #endif
 #include <errno.h>
+#include <unistd.h>
 #include <sys/types.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));
 }
 #endif
-strong_alias(__libc_lseek64,lseek64)
 libc_hidden_proto(lseek64)
+strong_alias(__libc_lseek64,lseek64)
 libc_hidden_def(lseek64)
 //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,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);
 libc_hidden_def(__libc_lseek)
 
-strong_alias(__libc_lseek,lseek)
 libc_hidden_proto(lseek)
+strong_alias(__libc_lseek,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)
 
 #if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(lstat,lstat64)
 libc_hidden_proto(lstat64)
+strong_alias(lstat,lstat64)
 libc_hidden_def(lstat64)
 #endif

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

@@ -14,6 +14,6 @@
 #define __NR___libc_nanosleep __NR_nanosleep
 _syscall2(int, __libc_nanosleep, const struct timespec *, req,
 		  struct timespec *, rem);
-strong_alias(__libc_nanosleep,nanosleep)
 libc_hidden_proto(nanosleep)
+strong_alias(__libc_nanosleep,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)
 
-strong_alias(__libc_open,open)
 libc_hidden_proto(open)
+strong_alias(__libc_open,open)
 libc_hidden_def(open)
 
 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);
 }
-strong_alias(__libc_open64,open64)
 libc_hidden_proto(open64)
+strong_alias(__libc_open64,open64)
 libc_hidden_def(open64)
 #endif /* __UCLIBC_HAS_LFS__ */

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

@@ -12,6 +12,6 @@
 
 #define __NR___libc_read __NR_read
 _syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
-strong_alias(__libc_read,read)
 libc_hidden_proto(read)
+strong_alias(__libc_read,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)
 
 #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
-strong_alias(stat,stat64)
 libc_hidden_proto(stat64)
+strong_alias(stat,stat64)
 libc_hidden_def(stat64)
 #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);
 }
-strong_alias(__libc_waitpid,waitpid)
 libc_hidden_proto(waitpid)
+strong_alias(__libc_waitpid,waitpid)
 libc_hidden_def(waitpid)

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

@@ -12,8 +12,8 @@
 
 #define __NR___libc_write __NR_write
 _syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
-strong_alias(__libc_write,write)
 libc_hidden_proto(write)
+strong_alias(__libc_write,write)
 libc_hidden_def(write)
 #if 0
 /* 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.  */
      /* i dunno what the blurb above is useful for. we just return. */
 __asm__("ret\n\tnop");
-strong_alias(__libc_fork,fork)
 libc_hidden_proto(fork)
+strong_alias(__libc_fork,fork)
 libc_hidden_def(fork)

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

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

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

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

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

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

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

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

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

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

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

@@ -31,7 +31,7 @@
 #if defined __UCLIBC_HAS_LFS__
 #define __NR___syscall_stat64 __NR_stat64
 static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
-strong_alias(__syscall_stat64,stat64)
 libc_hidden_proto(stat64)
+strong_alias(__syscall_stat64,stat64)
 libc_hidden_def(stat64)
 #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
 
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 #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
 
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 #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
 
 #ifndef LIBC_SIGACTION
-strong_alias(__libc_sigaction,sigaction)
 libc_hidden_proto(sigaction)
+strong_alias(__libc_sigaction,sigaction)
 libc_hidden_def(sigaction)
 #endif
 

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

@@ -17,13 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <dlfcn.h>
-#include "internals.h"
+#include <features.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.  */
 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.  */
 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,