* config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 14 Oct 2005 23:23:50 +0000 (23:23 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 14 Oct 2005 23:23:50 +0000 (23:23 +0000)
* lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
include <wchar.h>; no longer needed.
* lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
instead of inline stream orientation test and two separate
function calls.  Pay no attention to USE_IN_LIBIO.
* lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
macro argument.
Reported by Matej Vela <vela@debian.org>.

config/ChangeLog
config/srclist.txt
lib/ChangeLog
lib/obstack.c
lib/obstack.h

index 71be821..e2bc445 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
+
 2005-10-08  Simon Josefsson  <jas@extundo.com>
 
        * srclist.txt: Bug 1423 is closed, but 1439 remains.
index 7ef31d2..ec1b3b9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: srclist.txt,v 1.108 2005-10-08 11:05:24 jas Exp $
+# $Id: srclist.txt,v 1.109 2005-10-14 23:23:50 eggert Exp $
 # Files for which we are not the source.  See ./srclistvars.sh for the
 # variable definitions.
 
@@ -192,7 +192,11 @@ $LIBCSRC/time/mktime.c                     lib gpl
 # These are close, but ...
 #$LIBCSRC/locale/programs/xmalloc.c    lib gpl
 #$LIBCSRC/locale/programs/xstrdup.c    lib gpl
+#
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=321
 #$LIBCSRC/malloc/obstack.c             lib gpl
+#
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=321
 #$LIBCSRC/malloc/obstack.h             lib gpl
 #$LIBCSRC/misc/error.c                 lib gpl
 #$LIBCSRC/misc/error.h                 lib gpl
index 42e14eb..d3dce49 100644 (file)
@@ -1,3 +1,29 @@
+2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
+       include <wchar.h>; no longer needed.
+
+2005-10-14  Jakub Jelinek  <jakub@redhat.com>
+       and  Ulrich Drepper  <drepper@redhat.com>
+
+       Import from libc.
+       * obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
+       instead of inline stream orientation test and two separate
+       function calls.  Pay no attention to USE_IN_LIBIO.
+
+2005-10-14  Roland McGrath  <roland@redhat.com>
+
+       Import from libc.  [BZ #1331]
+       * obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
+       macro argument.
+       Reported by Matej Vela <vela@debian.org>.
+
+2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * mkdir-p.c (make_dir_parents): Don't report an error if an
+       intermediate directory is in a read-only file system.  Problem
+       reported by Eric Blake.
+
 2005-10-13  Simon Josefsson  <jas@extundo.com>
 
        * gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
        * exclude.c (bool): Declare, perhaps by including stdbool.h.
        (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
        (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
-       Include if available.
+       Include if available.
        (<xalloc.h>): Include
        (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
        (verify): New macro.  Use it to verify that EXCLUDE macros do not
index f3ca2c2..6df0611 100644 (file)
 # endif
 #endif
 
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
 #include <stddef.h>
 
 #ifndef ELIDE_CODE
@@ -433,12 +429,11 @@ print_and_abort (void)
      happen because the "memory exhausted" message appears in other places
      like this and the translation should be reused instead of creating
      a very similar string which requires a separate translation.  */
-# if defined _LIBC && defined USE_IN_LIBIO
-  if (_IO_fwide (stderr, 0) > 0)
-    __fwprintf (stderr, L"%s\n", _("memory exhausted"));
-  else
+# ifdef _LIBC
+  (void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
+# else
+  fprintf (stderr, "%s\n", _("memory exhausted"));
 # endif
-    fprintf (stderr, "%s\n", _("memory exhausted"));
   exit (obstack_exit_failure);
 }
 
index 940bc80..95dd438 100644 (file)
@@ -1,11 +1,7 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988-1994,1996-1999,2003,2004 Free Software Foundation, Inc.
-
-   This file is part of the GNU C Library.  Its master source is NOT part of
-   the C library, however.  The master source lives in /gd/gnu/lib.
-
-   NOTE: The canonical source of this file is maintained with the GNU C Library.
-   Bugs can be reported to bug-glibc@gnu.org.
+   Copyright (C) 1988-1994,1996-1999,2003,2004,2005
+       Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -464,7 +460,7 @@ __extension__                                                               \
   (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
 
 # define obstack_int_grow_fast(h,aint)                                 \
-  (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
+  (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
 
 # define obstack_blank(h,length)                                       \
 ( (h)->temp.tempint = (length),                                                \