Fix misc/error.c for !USE_IN_LIBIO
Mark Kettenis
kettenis@wins.uva.nl
Sat Aug 18 05:09:00 GMT 2001
Some fall out from yesterdays patches.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* misc/error.c [!USE_IN_LIBIO] (error_tail, error, error_at_line):
Leave out code dealing with stream orientation.
Index: misc/error.c
===================================================================
RCS file: /cvs/glibc/libc/misc/error.c,v
retrieving revision 1.23
diff -u -p -r1.23 error.c
--- misc/error.c 2001/08/16 05:22:07 1.23
+++ misc/error.c 2001/08/18 11:55:31
@@ -126,7 +126,7 @@ static void
error_tail (int status, int errnum, const char *message, va_list args)
{
# if HAVE_VPRINTF || _LIBC
-# ifdef _LIBC
+# if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
{
# define ALLOCA_LIMIT 2000
@@ -180,7 +180,7 @@ error_tail (int status, int errnum, cons
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
char *s = __strerror_r (errnum, errbuf, sizeof errbuf);
-# ifdef _LIBC
+# if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
fwprintf (stderr, L": %s", s);
else
@@ -190,7 +190,7 @@ error_tail (int status, int errnum, cons
fprintf (stderr, ": %s", strerror (errnum));
#endif
}
-#ifdef _LIBC
+#if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
putwc (L'\n', stderr);
else
@@ -231,7 +231,7 @@ error (status, errnum, message, va_alist
(*error_print_progname) ();
else
{
-#ifdef _LIBC
+#if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
fwprintf (stderr, L"%s: ", program_name);
else
@@ -303,7 +303,7 @@ error_at_line (status, errnum, file_name
(*error_print_progname) ();
else
{
-#ifdef _LIBC
+#if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
fwprintf (stderr, L"%s: ", program_name);
else
@@ -313,7 +313,7 @@ error_at_line (status, errnum, file_name
if (file_name != NULL)
{
-#ifdef _LIBC
+#if _LIBC && USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
fwprintf (stderr, L"%s:%d: ", file_name, line_number);
else
More information about the Libc-hacker
mailing list