Browse Source

Convert users

Peter S. Mazinger 18 năm trước cách đây
mục cha
commit
a1915d4502

+ 2 - 2
libc/misc/error/err.c

@@ -84,7 +84,7 @@ void warnx(const char *format, ...)
 void attribute_hidden __verr(int status, const char *format, va_list args)
 {
 	__vwarn(format, args);
-	exit(status);
+	__exit(status);
 }
 strong_alias(__verr,verr)
 
@@ -103,7 +103,7 @@ void attribute_noreturn err(int status, const char *format, ...)
 void attribute_hidden __verrx(int status, const char *format, va_list args)
 {
 	__vwarnx(format, args);
-	exit(status);
+	__exit(status);
 }
 strong_alias(__verrx,verrx)
 

+ 5 - 4
libc/misc/error/error.c

@@ -32,6 +32,7 @@
 #include <string.h>
 #include "error.h"
 
+extern int __putc(int c, FILE *stream) attribute_hidden;
 
 /* This variable is incremented each time `error' is called.  */
 unsigned int error_message_count;
@@ -57,9 +58,9 @@ void __error (int status, int errnum, const char *message, ...)
     if (errnum) {
 	fprintf (stderr, ": %s", strerror (errnum));
     }
-    putc ('\n', stderr);
+    __putc ('\n', stderr);
     if (status)
-	exit (status);
+	__exit (status);
 }
 
 void __error_at_line (int status, int errnum, const char *file_name,
@@ -93,9 +94,9 @@ void __error_at_line (int status, int errnum, const char *file_name,
     if (errnum) {
 	fprintf (stderr, ": %s", strerror (errnum));
     }
-    putc ('\n', stderr);
+    __putc ('\n', stderr);
     if (status)
-	exit (status);
+	__exit (status);
 }
 
 /* Use the weaks here in an effort at controlling namespace pollution */

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

@@ -28,7 +28,6 @@ Cambridge, MA 02139, USA.  */
 #include <fnmatch.h>
 #include <ctype.h>
 
-
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself.  This code is part of the GNU C
    Library, but also included in many other GNU distributions.  Compiling

+ 1 - 1
libc/misc/gnu/obstack.c

@@ -502,7 +502,7 @@ print_and_abort ()
   else
 # endif
     fprintf (stderr, "%s\n", _("memory exhausted"));
-  exit (obstack_exit_failure);
+  __exit (obstack_exit_failure);
 }
 
 # if 0

+ 2 - 2
libc/misc/internals/__uClibc_main.c

@@ -60,7 +60,7 @@ extern void weak_function _stdio_init(void) attribute_hidden;
 extern int *weak_const_function __errno_location(void);
 extern int *weak_const_function __h_errno_location(void);
 #ifdef __UCLIBC_HAS_LOCALE__
-extern void weak_function _locale_init(void);
+extern void weak_function _locale_init(void) attribute_hidden;
 #endif
 #ifdef __UCLIBC_HAS_THREADS__
 extern void weak_function __pthread_initialize_minimal(void);
@@ -281,5 +281,5 @@ __uClibc_main(int (*main)(int, char **, char **), int argc,
     /*
      * Finally, invoke application's main and then exit.
      */
-    exit(main(argc, argv, __environ));
+    __exit(main(argc, argv, __environ));
 }

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

@@ -2,6 +2,7 @@
 #define strstr __strstr
 #define atoi __atoi
 #define fseek __fseek
+#define fgets __fgets
 
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 1
libc/misc/pthread/weaks.c

@@ -107,7 +107,7 @@ weak_alias (__pthread_return_1, pthread_equal)
 
 void weak_function pthread_exit (void *retval)
 {
-  exit (EXIT_SUCCESS);
+  __exit (EXIT_SUCCESS);
 }
 */
 

+ 4 - 1
libc/misc/ttyent/getttyent.c

@@ -29,6 +29,7 @@
 
 #define __fsetlocking __fsetlocking_internal
 #define rewind __rewind
+#define fgets_unlocked __fgets_unlocked
 
 #define _GNU_SOURCE
 #include <features.h>
@@ -42,6 +43,8 @@
 #include <pthread.h>
 #endif
 
+extern int __getc_unlocked (FILE *__stream) attribute_hidden;
+
 static char zapchar;
 static FILE *tf;
 static struct ttyent tty;
@@ -130,7 +133,7 @@ struct ttyent attribute_hidden * __getttyent(void)
 	}
 	/* skip lines that are too big */
 	if (!__strchr(p, '\n')) {
-	    while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
+	    while ((c = __getc_unlocked(tf)) != '\n' && c != EOF)
 		;
 	    continue;
 	}