* 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>. --- ChangeLog | 9 +++++++++ lib/regex_internal.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index de1c81c..cab9521 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-01-01 Paul Eggert <egg...@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 <ebl...@redhat.com> maint: update all copyright year number ranges diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 32b6b67..43fae40 100644 --- 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 @@ struct re_dfa_t #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)) -- 1.7.11.7