[PATCH 03/17] Regex: Bracket call to __libc_lock_define inside ifdef.

Paul Eggert eggert@cs.ucla.edu
Tue Dec 19 22:25:00 GMT 2017


On 12/08/2017 01:16 AM, Arnold Robbins wrote:
> This patch brackets a call to __libc_lock_define inside the correct ifdef.
>
> 2017-11-27         Arnold D. Robbins     <arnold@skeeve.com>
>
> 	* posix/regex_internal.h (re_dfa_t): Bracket call to
> 	__libc_lock_define insidef ifdef _LIBC.
>

The commit message should explain the actual problem here, which is that 
the current code passes an empty argument to a macro, and this does not 
conform to C89 and some older compilers reject it. Also, the change 
should remove the now-unused #define for __libc_lock_define when _LIBC 
is not defined. In short, I suggest something like the following change 
instead:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=3ccb7f0727c5154ee91609f30b0fb62b94142c10

This is already in Gnulib.



More information about the Libc-alpha mailing list