changeset 6376:56829cd68e67

* config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h. * 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>.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 14 Oct 2005 23:23:50 +0000
parents 792a53343abe
children da7777b11fa2
files config/ChangeLog config/srclist.txt lib/ChangeLog lib/obstack.c lib/obstack.h
diffstat 5 files changed, 44 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -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.
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -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 @@
 # 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
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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.
@@ -6760,7 +6786,7 @@
 	* 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
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -51,10 +51,6 @@
 # endif
 #endif
 
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
 #include <stddef.h>
 
 #ifndef ELIDE_CODE
@@ -433,12 +429,11 @@
      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);
 }
 
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -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 @@
   (((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),						\