diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-11-08 00:22:30 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-11-08 00:22:30 +0000 |
commit | 8cdbf8e55b8aaad2b6f69893f4491b509eecc5df (patch) | |
tree | e5e2a6df04d9ff10a919d3202440078d76db5a81 /lib/xmalloc.c | |
parent | 4186a0ec215be86dabc5264a8bb1ea49841f6a16 (diff) | |
download | gnulib-8cdbf8e55b8aaad2b6f69893f4491b509eecc5df.tar.gz |
* lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
definitions up, to avoid colliding with change below.
(static_inline) [HAVE_INLINE]: New macro.
(xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
Provide extern decls when !HAVE_INLINE. Do not define unless
static_inline is defined, either by us or by xmalloc.c. Use
static_inline rather than static inline.
(XCALLOC): Optimize sizeof(T) = 1 case.
* lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2006-11-07 Bruno Haible <bruno@clisp.org>
* lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
* m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
AC_C_INLINE.
* modules/xalloc (Files): Add m4/inline.m4.
Diffstat (limited to 'lib/xmalloc.c')
-rw-r--r-- | lib/xmalloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xmalloc.c b/lib/xmalloc.c index c04d27d0a6..318e0ddb5a 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -20,7 +20,11 @@ #include <config.h> +#if ! HAVE_INLINE +# define static_inline +#endif #include "xalloc.h" +#undef static_inline #include <stdlib.h> #include <string.h> |