bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

obstack merge from libc


From: Paul Eggert
Subject: obstack merge from libc
Date: Fri, 14 Oct 2005 16:27:52 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I merged the following changes from libc into gnulib, in an attempt to
make it easier to merge gnulib's changes back into libc, and to record
the reason why the two versions still differ.

2005-10-14  Paul Eggert  <address@hidden>

        * 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.

2005-10-14  Jakub Jelinek  <address@hidden>
       and  Ulrich Drepper  <address@hidden>

        Import from libc.
        * 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.

2005-10-14  Roland McGrath  <address@hidden>

        Import from libc.  [BZ #1331]
        * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
        macro argument.
        Reported by Matej Vela <address@hidden>.

--- config/srclist.txt  8 Oct 2005 11:05:24 -0000       1.108
+++ config/srclist.txt  14 Oct 2005 23:22:15 -0000
@@ -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
--- lib/obstack.c       14 May 2005 06:03:58 -0000      1.31
+++ lib/obstack.c       14 Oct 2005 23:22:15 -0000
@@ -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 @@ 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);
 }
 
--- lib/obstack.h       14 May 2005 06:03:58 -0000      1.31
+++ lib/obstack.h       14 Oct 2005 23:22:15 -0000
@@ -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 address@hidden
+   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),                                                
\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]