regex: port to hosts where malloc (0) == NULL
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Dec 2012 06:56:31 +0000 (22:56 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Dec 2012 08:13:15 +0000 (00:13 -0800)
commitbbf0d723ed2335add96bcc0f842885d8a5d8b6da
tree321231ad125a0b3cae1ca1832ab8347db2b3b7e7
parent585a8dcf51a46cd9965c6881cfff6eddbae06d48
regex: port to hosts where malloc (0) == NULL

Reported by Aharon Robbins in
<http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
* lib/regex_internal.c (re_node_set_alloc):
Don't assume that malloc (0) yields nonnull.
* lib/regex_internal.h (MALLOC_0_IS_NONNULL): New macro.
* m4/regex.m4 (gl_PREREQ_REGEX): Require gl_EEMALLOC.
* modules/regex (Files): Add m4/eealloc.m4.
ChangeLog
lib/regex_internal.c
lib/regex_internal.h
m4/regex.m4
modules/regex