Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 15 Aug 2001 06:23:11 +0000 (06:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 15 Aug 2001 06:23:11 +0000 (06:23 +0000)
2001-08-14  Ulrich Drepper  <drepper@redhat.com>

* stdio-common/perror.c (perror): Use _IO_fwide instead of fwide.

* libio/libio.h (_IO_fwide): Handle zero as second parameter more
efficiently in macro.

ChangeLog
libio/libio.h
stdio-common/perror.c

index 9f43dba..1f756dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-14  Ulrich Drepper  <drepper@redhat.com>
+
+       * stdio-common/perror.c (perror): Use _IO_fwide instead of fwide.
+
+       * libio/libio.h (_IO_fwide): Handle zero as second parameter more
+       efficiently in macro.
+
 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
 
        * resolv/nss_dns/dns-host.c (RESOLVSORT): Define.
index 880edaf..1bd3189 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995, 1997-2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -495,6 +495,8 @@ weak_extern (_IO_stdin_used);
           (__fp)->_mode = -1;                                                \
         __result = (__fp)->_mode;                                            \
        }                                                                     \
+     else if (__builtin_constant_p (__mode) && (__mode) == 0)                \
+       __result = (__fp)->_mode;                                             \
      else                                                                    \
        __result = _IO_fwide (__fp, __result);                                \
      __result; })
index 8ac8bc4..c22be6d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1997,1998,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1997,1998,2000,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,7 +40,7 @@ perror (const char *s)
   errstring = __strerror_r (errnum, buf, sizeof buf);
 
 #ifdef USE_IN_LIBIO
-  if (fwide (stderr, 0) > 0)
+  if (_IO_fwide (stderr, 0) > 0)
     (void) fwprintf (stderr, L"%s%s%s\n", s, colon, errstring);
   else
 #endif