bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] obstack import from libc


From: Paul Eggert
Subject: [Bug-gnulib] obstack import from libc
Date: Thu, 06 May 2004 21:34:21 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed the following patch to sync obstack with glibc.  But
before you break out the champagne and celebrate that we're in sync
finally, I'm about to make some more changes to obstack, to port it to
the AS/400, of all places, since Bison doesn't work on the AS/400
right now.

2004-05-06  Paul Eggert  <address@hidden>

        * obstack.c, obstack.h: Import changes from libc.

Index: lib/obstack.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/obstack.c,v
retrieving revision 1.23
diff -p -u -r1.23 obstack.c
--- lib/obstack.c       24 Jan 2004 07:22:34 -0000      1.23
+++ lib/obstack.c       7 May 2004 04:21:25 -0000
@@ -379,7 +379,9 @@ _obstack_memory_used (struct obstack *h)
 # else
 #  include "gettext.h"
 # endif
-# define _(msgid) gettext (msgid)
+# ifndef _
+#  define _(msgid) gettext (msgid)
+# endif
 
 # ifdef _LIBC
 #  include <libio/iolibio.h>
Index: lib/obstack.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/obstack.h,v
retrieving revision 1.25
diff -p -u -r1.25 obstack.h
--- lib/obstack.h       22 Oct 2003 05:10:04 -0000      1.25
+++ lib/obstack.h       7 May 2004 04:21:25 -0000
@@ -1,5 +1,5 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99,2003 Free Software 
Foundation, Inc.
+   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.
@@ -409,9 +409,8 @@ __extension__                                               
                \
 # define obstack_finish(OBSTACK)                                       \
 __extension__                                                          \
 ({ struct obstack *__o1 = (OBSTACK);                                   \
-   void *value;                                                                
\
-   value = (void *) __o1->object_base;                                 \
-   if (__o1->next_free == value)                                       \
+   void *__value = (void *) __o1->object_base;                         \
+   if (__o1->next_free == __value)                                     \
      __o1->maybe_empty_object = 1;                                     \
    __o1->next_free                                                     \
      = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
@@ -420,7 +419,7 @@ __extension__                                               
                \
        > __o1->chunk_limit - (char *)__o1->chunk)                      \
      __o1->next_free = __o1->chunk_limit;                              \
    __o1->object_base = __o1->next_free;                                        
\
-   value; })
+   __value; })
 
 # define obstack_free(OBSTACK, OBJ)                                    \
 __extension__                                                          \





reply via email to

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