diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-05-29 10:24:17 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-05-29 10:24:38 -0700 |
commit | 55ba71f47850fbd870cb08bac1cf992f1368295e (patch) | |
tree | 0cee0ddc976e50cfc404e973077b837fd326c3bd /modules | |
parent | e28fbd787cb4861a7848ac6e86c838912b8cd2ec (diff) | |
download | gnulib-55ba71f47850fbd870cb08bac1cf992f1368295e.tar.gz |
regex: adapt to locking regime instead of depending on pthread
Instead of depending on pthread, adapt to whatever thread
modules are in use. Problem reported by Ludovic Courtès in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00082.html>
and by Mats Erik Andersson in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00100.html>.
* lib/regex_internal.h (lock_define, lock_init, lock_fini):
Support either the 'lock' module, or the 'pthread' module, or
no module.
(lock_lock, lock_unlock): New macros.
* lib/regexec.c (regexec, re_search_stub): Use the new macros.
* modules/lock, modules/pthread (configure.ac): Add module indicator.
* modules/regex (Depends-on): Remove pthread.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lock | 1 | ||||
-rw-r--r-- | modules/pthread | 1 | ||||
-rw-r--r-- | modules/regex | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/modules/lock b/modules/lock index f7e4c9a9b5..3377915fcf 100644 --- a/modules/lock +++ b/modules/lock @@ -11,6 +11,7 @@ threadlib configure.ac: gl_LOCK +gl_MODULE_INDICATOR([lock]) Makefile.am: lib_SOURCES += glthread/lock.h glthread/lock.c diff --git a/modules/pthread b/modules/pthread index cd49852581..e583929e1b 100644 --- a/modules/pthread +++ b/modules/pthread @@ -13,6 +13,7 @@ time configure.ac: gl_PTHREAD_CHECK +gl_MODULE_INDICATOR([pthread]) Makefile.am: BUILT_SOURCES += $(PTHREAD_H) diff --git a/modules/regex b/modules/regex index 2dbb777d65..8f5eda0612 100644 --- a/modules/regex +++ b/modules/regex @@ -24,7 +24,6 @@ memmove [test $ac_use_included_regex = yes] mbrtowc [test $ac_use_included_regex = yes] mbsinit [test $ac_use_included_regex = yes] nl_langinfo [test $ac_use_included_regex = yes] -pthread [test $ac_use_included_regex = yes] stdbool [test $ac_use_included_regex = yes] stdint [test $ac_use_included_regex = yes] wchar [test $ac_use_included_regex = yes] |