aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorPaul Eggert2011-04-08 14:53:30 -0700
committerPaul Eggert2011-04-08 14:53:30 -0700
commit7ec98caf7757bbf462d91a5cebd440cf12cc5816 (patch)
treea06f12700c55c0a932163ff80c6c3d01883a9c36 /lib/stdlib.in.h
parent70476b54414db1be5261c71073fc991eab5cd34a (diff)
downloademacs-7ec98caf7757bbf462d91a5cebd440cf12cc5816.tar.gz
emacs-7ec98caf7757bbf462d91a5cebd440cf12cc5816.zip
Update from gnulib.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 2697a4bd1db..b9ada2cd1a8 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -255,9 +255,14 @@ _GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
255# endif 255# endif
256#endif 256#endif
257 257
258/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
259 rely on GNU or POSIX semantics for malloc and realloc (for example,
260 by never specifying a zero size), so it does not need malloc or
261 realloc to be redefined. */
258#if @GNULIB_MALLOC_POSIX@ 262#if @GNULIB_MALLOC_POSIX@
259# if @REPLACE_MALLOC@ 263# if @REPLACE_MALLOC@
260# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 264# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
265 || _GL_USE_STDLIB_ALLOC)
261# undef malloc 266# undef malloc
262# define malloc rpl_malloc 267# define malloc rpl_malloc
263# endif 268# endif
@@ -267,7 +272,7 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
267_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); 272_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
268# endif 273# endif
269_GL_CXXALIASWARN (malloc); 274_GL_CXXALIASWARN (malloc);
270#elif defined GNULIB_POSIXCHECK 275#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
271# undef malloc 276# undef malloc
272/* Assume malloc is always declared. */ 277/* Assume malloc is always declared. */
273_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " 278_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
@@ -531,7 +536,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
531 536
532#if @GNULIB_REALLOC_POSIX@ 537#if @GNULIB_REALLOC_POSIX@
533# if @REPLACE_REALLOC@ 538# if @REPLACE_REALLOC@
534# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 539# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
540 || _GL_USE_STDLIB_ALLOC)
535# undef realloc 541# undef realloc
536# define realloc rpl_realloc 542# define realloc rpl_realloc
537# endif 543# endif
@@ -541,7 +547,7 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
541_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); 547_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
542# endif 548# endif
543_GL_CXXALIASWARN (realloc); 549_GL_CXXALIASWARN (realloc);
544#elif defined GNULIB_POSIXCHECK 550#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
545# undef realloc 551# undef realloc
546/* Assume realloc is always declared. */ 552/* Assume realloc is always declared. */
547_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " 553_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "