# HG changeset patch # User Paul Eggert # Date 1129332230 0 # Node ID 56829cd68e67749cd7cb8422a76ee192d8a51ab8 # Parent 792a53343abedb0df32a76bf440508ecdcf5b0cf * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h. * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't include ; 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 . diff --git a/config/ChangeLog b/config/ChangeLog --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2005-10-14 Paul Eggert + + * srclist.txt: Add glibc bug 321 for obstack.c, obstack.h. + 2005-10-08 Simon Josefsson * srclist.txt: Bug 1423 is closed, but 1439 remains. diff --git a/config/srclist.txt b/config/srclist.txt --- 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 diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,29 @@ +2005-10-14 Paul Eggert + + * obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't + include ; no longer needed. + +2005-10-14 Jakub Jelinek + and Ulrich Drepper + + 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 + + Import from libc. [BZ #1331] + * obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed + macro argument. + Reported by Matej Vela . + +2005-10-13 Paul Eggert + + * 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 * gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation. @@ -6760,7 +6786,7 @@ * exclude.c (bool): Declare, perhaps by including stdbool.h. (): Include only if HAVE_SYS_TYPES_H. (, , , , ): - Include if available. + Include if available. (): Include (SIZE_MAX): Define if or doesn't. (verify): New macro. Use it to verify that EXCLUDE macros do not diff --git a/lib/obstack.c b/lib/obstack.c --- a/lib/obstack.c +++ b/lib/obstack.c @@ -51,10 +51,6 @@ # endif #endif -#if defined _LIBC && defined USE_IN_LIBIO -# include -#endif - #include #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); } diff --git a/lib/obstack.h b/lib/obstack.h --- 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), \