diff options
author | Jim Meyering <jim@meyering.net> | 1995-08-09 05:15:31 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-08-09 05:15:31 +0000 |
commit | 10c5aeabc5cde076c484c2c047120a412f32e26b (patch) | |
tree | 7c029c05656b740e8ab3bf0393a5ee7e74c0b095 /lib | |
parent | 9c5f82a7f1ad1adf8276085bd88e13a338b6f04a (diff) | |
download | coreutils-10c5aeabc5cde076c484c2c047120a412f32e26b.tar.xz |
Include config.h.
Define bcopy to memcpy if possible.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/obstack.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/obstack.h b/lib/obstack.h index 1f0b5269b..137e3ff70 100644 --- a/lib/obstack.h +++ b/lib/obstack.h @@ -103,6 +103,10 @@ Summary: #ifndef __OBSTACK_H__ #define __OBSTACK_H__ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + /* We use subtraction of (char *)0 instead of casting to int because on word-addressable machines a simple cast to int may ignore the byte-within-word field of the pointer. */ @@ -138,6 +142,15 @@ Summary: #define PTR_INT_TYPE long #endif +#if HAVE_STRING_H || STDC_HEADERS +# include <string.h> +# ifndef bcopy +# define bcopy(s, d, n) memcpy ((d), (s), (n)) +# endif +#else /* HAVE_STRING_H || STDC_HEADERS */ +# include <strings.h> +#endif /* not (HAVE_STRING_H || STDC_HEADERS) */ + struct _obstack_chunk /* Lives at front of each chunk. */ { char *limit; /* 1 past end of this chunk */ @@ -331,7 +344,7 @@ __extension__ \ /* These assume that the obstack alignment is good enough for pointers or ints, and that the data added so far to the current object shares that much alignment. */ - + #define obstack_ptr_grow(OBSTACK,datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ |