strtoimax: port to HP-UX 11.11
[gnulib.git] / lib / obstack.h
index 0a1e473..7cf98ed 100644 (file)
@@ -1,5 +1,5 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2012 Free Software
+   Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2013 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -122,7 +122,7 @@ Summary:
 
 #define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
 
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case
    where pointers can be converted to integers, aligned as integers,
    and converted back again.  If PTR_INT_TYPE is narrower than a
    pointer (e.g., the AS/400), play it safe and compute the alignment
@@ -253,7 +253,7 @@ extern int obstack_exit_failure;
 
 #define obstack_memory_used(h) _obstack_memory_used (h)
 \f
-#if defined __GNUC__ && defined __STDC__ && __STDC__
+#if defined __GNUC__
 /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
    does not implement __extension__.  But that compiler doesn't define
    __GNUC_MINOR__.  */
@@ -342,14 +342,16 @@ __extension__                                                           \
 # define obstack_ptr_grow_fast(OBSTACK,aptr)                            \
 __extension__                                                           \
 ({ struct obstack *__o1 = (OBSTACK);                                    \
-   *(const void **) __o1->next_free = (aptr);                           \
+   void *__p1 = __o1->next_free;                                        \
+   *(const void **) __p1 = (aptr);                                      \
    __o1->next_free += sizeof (const void *);                            \
    (void) 0; })
 
 # define obstack_int_grow_fast(OBSTACK,aint)                            \
 __extension__                                                           \
 ({ struct obstack *__o1 = (OBSTACK);                                    \
-   *(int *) __o1->next_free = (aint);                                   \
+   void *__p1 = __o1->next_free;                                        \
+   *(int *) __p1 = (aint);                                              \
    __o1->next_free += sizeof (int);                                     \
    (void) 0; })
 
@@ -405,7 +407,7 @@ __extension__                                                           \
      __o->next_free = __o->object_base = (char *)__obj;                 \
    else (__obstack_free) (__o, __obj); })
 \f
-#else /* not __GNUC__ or not __STDC__ */
+#else /* not __GNUC__ */
 
 # define obstack_object_size(h) \
  (unsigned) ((h)->next_free - (h)->object_base)
@@ -503,7 +505,7 @@ __extension__                                                           \
             = (h)->temp.tempint + (char *) (h)->chunk)                  \
    : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
 
-#endif /* not __GNUC__ or not __STDC__ */
+#endif /* not __GNUC__ */
 
 #ifdef __cplusplus
 }       /* C++ */