Nathan Kennedy wrote:
If saving that one test is worth the risk that MALLOC_0_IS_NONNULL will
always be correctly be defined, e.g. that this will never always be true
for all potential users:
+#ifdef _LIBC
+# define MALLOC_0_IS_NONNULL 1
uClibc defines it too:
libc-symbols.h:#define _LIBC 1
Nathan
I thought you said that malloc (0) returns NULL in uClibc? If so, then
why would it be correct to define MALLOC_0_IS_NONNULL when uClibc is in use?
The current code sets MALLOC_0_IS_NONNULL to 1 when it's known that
malloc (0) returns a nonnull value. If there's something wrong with the
test I suppose we can fix it, but that's the proper place to fix it.