summaryrefslogtreecommitdiff
path: root/malloc/obstack.h
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/obstack.h')
-rw-r--r--malloc/obstack.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/malloc/obstack.h b/malloc/obstack.h
index 2802888763..0e7eb09054 100644
--- a/malloc/obstack.h
+++ b/malloc/obstack.h
@@ -1,5 +1,5 @@
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96,97 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.
@@ -144,9 +144,12 @@ Summary:
#if defined (_LIBC) || defined (HAVE_STRING_H)
#include <string.h>
+#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
-#ifndef memcpy
-#define memcpy(To, From, N) bcopy (From, To, N)
+#ifdef memcpy
+#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+#else
+#define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
#endif
#endif
@@ -377,7 +380,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
- memcpy (__o->next_free, (char *) (where), __len); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
__o->next_free += __len; \
(void) 0; })
@@ -387,7 +390,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
- memcpy (__o->next_free, (char *) (where), __len); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
__o->next_free += __len; \
*(__o->next_free)++ = 0; \
(void) 0; })
@@ -499,14 +502,14 @@ __extension__ \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- memcpy ((h)->next_free, (char *) (where), (h)->temp), \
+ _obstack_memcpy ((h)->next_free, (char *) (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), \
- memcpy ((h)->next_free, (char *) (where), (h)->temp), \
+ _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
(h)->next_free += (h)->temp, \
*((h)->next_free)++ = 0)