bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex no longer needs to depend on malloc-gnu


From: Paul Eggert
Subject: Re: regex no longer needs to depend on malloc-gnu
Date: Fri, 18 Apr 2014 08:00:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]