summaryrefslogtreecommitdiffstats
path: root/libc/misc/error
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/error')
-rw-r--r--libc/misc/error/err.c8
-rw-r--r--libc/misc/error/error.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 922cd8aba..43fe60cc6 100644
--- a/libc/misc/error/err.c
+++ b/libc/misc/error/err.c
@@ -19,10 +19,8 @@
#endif
#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: Need a centralized __progname prototype.
#warning REMINDER: Deal with wide oriented stderr case.
#endif
-extern const char *__progname;
static void vwarn_work(const char *format, va_list args, int showerr)
{
@@ -41,7 +39,7 @@ static void vwarn_work(const char *format, va_list args, int showerr)
__STDIO_AUTO_THREADLOCK(stderr);
- fprintf(stderr, fmt, __progname);
+ fprintf(stderr, fmt, __uclibc_progname);
if (format) {
vfprintf(stderr, format, args);
f -= 2; /* At 5 (showerr) or 9. */
@@ -84,7 +82,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 +101,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 5427e9568..b51177e35 100644
--- a/libc/misc/error/error.c
+++ b/libc/misc/error/error.c
@@ -24,6 +24,7 @@
#define strerror __strerror
#define vfprintf __vfprintf
+#define fflush __fflush
#include <stdio.h>
#include <stdarg.h>
@@ -31,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;
@@ -56,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,
@@ -92,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 */