Browse Source

michael_d writes in #1869: make sure GNU error functions output 'program: ' as documented in the function api

Mike Frysinger 17 years ago
parent
commit
3147039a65
1 changed files with 4 additions and 0 deletions
  1. 4 0
      libc/misc/error/error.c

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

@@ -53,6 +53,8 @@ void __error (int status, int errnum, const char *message, ...)
 
     fflush (stdout);
 
+    fprintf (stderr, "%s: ", __uclibc_progname);
+
     va_start (args, message);
     vfprintf (stderr, message, args);
     va_end (args);
@@ -87,6 +89,8 @@ void __error_at_line (int status, int errnum, const char *file_name,
 
     fflush (stdout);
 
+    fprintf (stderr, "%s:", __uclibc_progname);
+
     if (file_name != NULL)
 	fprintf (stderr, "%s:%d: ", file_name, line_number);