summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/error/err.c4
-rw-r--r--libc/misc/error/error.c9
-rw-r--r--libc/misc/fnmatch/fnmatch.c1
-rw-r--r--libc/misc/gnu/obstack.c2
-rw-r--r--libc/misc/internals/__uClibc_main.c4
-rw-r--r--libc/misc/mntent/mntent.c1
-rw-r--r--libc/misc/pthread/weaks.c2
-rw-r--r--libc/misc/ttyent/getttyent.c5
8 files changed, 16 insertions, 12 deletions
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 922cd8aba..ddb8786b0 100644
--- a/libc/misc/error/err.c
+++ b/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)
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c
index 119396570..b51177e35 100644
--- a/libc/misc/error/error.c
+++ b/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 */
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index e0d9daa87..892738999 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/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
diff --git a/libc/misc/gnu/obstack.c b/libc/misc/gnu/obstack.c
index 9cc90bd42..6521bd1d4 100644
--- a/libc/misc/gnu/obstack.c
+++ b/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
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index bbb770af5..6cd2eaa01 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/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));
}
diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c
index 49251479d..01970148f 100644
--- a/libc/misc/mntent/mntent.c
+++ b/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>
diff --git a/libc/misc/pthread/weaks.c b/libc/misc/pthread/weaks.c
index b28470251..4b9e02672 100644
--- a/libc/misc/pthread/weaks.c
+++ b/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);
}
*/
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 8e104733c..9b83b6ede 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/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;
}