Added Self to Write After Approval
[deliverable/binutils-gdb.git] / include / obstack.h
index 38e96777660d5bbdafa108ae60def43e5221b750..d86d9f2c4263f772cc8659f923d5948c30a73e33 100644 (file)
@@ -1,5 +1,7 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
+   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+   1999, 2000
+   Free Software Foundation, Inc.
 
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
@@ -143,12 +145,16 @@ extern "C" {
 
 #if defined _LIBC || defined HAVE_STRING_H
 # include <string.h>
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+# if defined __STDC__ && __STDC__
+#  define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+# else
+#  define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
+# endif
 #else
 # ifdef memcpy
-#  define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+#  define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
 # else
-#  define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
+#  define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
 # endif
 #endif
 
@@ -385,7 +391,7 @@ __extension__                                                               \
    int __len = (length);                                               \
    if (__o->next_free + __len > __o->chunk_limit)                      \
      _obstack_newchunk (__o, __len);                                   \
-   _obstack_memcpy (__o->next_free, (char *) (where), __len);          \
+   _obstack_memcpy (__o->next_free, (where), __len);                   \
    __o->next_free += __len;                                            \
    (void) 0; })
 
@@ -395,7 +401,7 @@ __extension__                                                               \
    int __len = (length);                                               \
    if (__o->next_free + __len + 1 > __o->chunk_limit)                  \
      _obstack_newchunk (__o, __len + 1);                               \
-   _obstack_memcpy (__o->next_free, (char *) (where), __len);          \
+   _obstack_memcpy (__o->next_free, (where), __len);                   \
    __o->next_free += __len;                                            \
    *(__o->next_free)++ = 0;                                            \
    (void) 0; })
@@ -510,14 +516,14 @@ __extension__                                                             \
 ( (h)->temp = (length),                                                        \
   (((h)->next_free + (h)->temp > (h)->chunk_limit)                     \
    ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),                     \
-  _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp),       \
+  _obstack_memcpy ((h)->next_free, (where), (h)->temp),                        \
   (h)->next_free += (h)->temp)
 
 # define obstack_grow0(h,where,length)                                 \
 ( (h)->temp = (length),                                                        \
   (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit)                 \
    ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0),                 \
-  _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp),       \
+  _obstack_memcpy ((h)->next_free, (where), (h)->temp),                        \
   (h)->next_free += (h)->temp,                                         \
   *((h)->next_free)++ = 0)
 
This page took 0.025104 seconds and 4 git commands to generate.