X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ferror.c;h=858ad247785611bf5166b7d971c6a987c8df1552;hb=c5467a5a59852da74dc849497f47b4966fcba269;hp=31d3affcbd9804cbf176a84f9a25dfe8da38321d;hpb=9ecb52885659513fe468fa1b1dab6a7b4f2c1471;p=gnulib.git diff --git a/lib/error.c b/lib/error.c index 31d3affcb..858ad2477 100644 --- a/lib/error.c +++ b/lib/error.c @@ -132,11 +132,10 @@ print_errno_message (int errnum) static void error_tail (int status, int errnum, const char *message, va_list args) { -# if HAVE_VPRINTF || _LIBC -# if _LIBC +#if _LIBC if (_IO_fwide (stderr, 0) > 0) { -# define ALLOCA_LIMIT 2000 +# define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; @@ -174,21 +173,18 @@ error_tail (int status, int errnum, const char *message, va_list args) __vfwprintf (stderr, wmessage, args); } else -# endif +#endif vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif va_end (args); ++error_message_count; if (errnum) print_errno_message (errnum); -# if _LIBC +#if _LIBC if (_IO_fwide (stderr, 0) > 0) putwc (L'\n', stderr); else -# endif +#endif putc ('\n', stderr); fflush (stderr); if (status) @@ -200,7 +196,6 @@ error_tail (int status, int errnum, const char *message, va_list args) format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ -/* VARARGS */ void error (int status, int errnum, const char *message, ...) {