Mercurial > hg > octave-kai > gnulib-hg
changeset 17250:1989495b62ae
regex: port __libc_lock_define usage to C89
* lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove.
(struct re_dfa_t): Use #ifdef instead. '__libc_lock_define (, lock)'
does not conform to C89, as it has an empty macro argument.
Reported by Aharon Robbins in
<http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2013 07:59:12 -0800 |
parents | e542fd46ad6f |
children | 8bb0db9040e5 |
files | ChangeLog lib/regex_internal.h |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-01-01 Paul Eggert <eggert@cs.ucla.edu> + + regex: port __libc_lock_define usage to C89 + * lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove. + (struct re_dfa_t): Use #ifdef instead. '__libc_lock_define (, lock)' + does not conform to C89, as it has an empty macro argument. + Reported by Aharon Robbins in + <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>. + 2013-01-01 Eric Blake <eblake@redhat.com> maint: update all copyright year number ranges
--- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -35,7 +35,6 @@ #if defined _LIBC # include <bits/libc-lock.h> #else -# define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) @@ -699,7 +698,9 @@ #ifdef DEBUG char* re_str; #endif +#ifdef _LIBC __libc_lock_define (, lock) +#endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))