Will Newton wrote: > Further to the changes to error.c to fix bug #1869 it would be nice if > uClibc supported error_print_progname. The attached patch aims to do > that. > >
Hello, this is an old story. uClibc doesn't provide support for error_print_progname even if header error.h declare it. I would like to have it implemented before using. If we know that it's missing, while testing for its value and call it ? This my opinion. Cheers, Carmelo > ------------------------------------------------------------------------ > > --- uClibc/libc/misc/error/error.c 2008-03-19 07:10:25.000000000 +0000 > +++ uClibc.mod/libc/misc/error/error.c 2008-03-20 14:43:38.000000000 > +0000 > @@ -44,7 +44,7 @@ > /* If NULL, error will flush stdout, then print on stderr the program > name, a colon and a space. Otherwise, error will call this > function without parameters instead. */ > -/* void (*error_print_progname) (void) = NULL; */ > +void (*error_print_progname) (void) = NULL; > > extern __typeof(error) __error attribute_hidden; > void __error (int status, int errnum, const char *message, ...) > @@ -53,7 +53,10 @@ > > fflush (stdout); > > - fprintf (stderr, "%s: ", __uclibc_progname); > + if (error_print_progname) > + (*error_print_progname) (); > + else > + fprintf (stderr, "%s: ", __uclibc_progname); > > va_start (args, message); > vfprintf (stderr, message, args); > @@ -89,7 +92,10 @@ > > fflush (stdout); > > - fprintf (stderr, "%s:", __uclibc_progname); > + if (error_print_progname) > + (*error_print_progname) (); > + else > + fprintf (stderr, "%s:", __uclibc_progname); > > if (file_name != NULL) > fprintf (stderr, "%s:%d: ", file_name, line_number); > > > ------------------------------------------------------------------------ > > _______________________________________________ > uClibc mailing list > [email protected] > http://busybox.net/cgi-bin/mailman/listinfo/uclibc _______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
