From: Paul Eggert Date: Fri, 13 Jun 2014 15:30:48 +0000 (-0700) Subject: regex: don't be multithreaded if USE_UNLOCKED_IO. X-Git-Tag: v1.0~7354 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a8ba7140ace794a511f97ab7de1addc6a3cf4fca;p=gnulib.git regex: don't be multithreaded if USE_UNLOCKED_IO. Problem reported by Michael Felt in: http://bugs.gnu.org/17773 * lib/regex_internal.h: Do not use multithreaded version if USE_UNLOCKED_IO is defined. This is a hack, but it works around a porting bug with coreutils 8.22 on AIX 7.1. --- diff --git a/ChangeLog b/ChangeLog index 4535bb5291..cd1989714f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-06-13 Paul Eggert + + regex: don't be multithreaded if USE_UNLOCKED_IO. + Problem reported by Michael Felt in: http://bugs.gnu.org/17773 + * lib/regex_internal.h: Do not use multithreaded version if + USE_UNLOCKED_IO is defined. This is a hack, but it works + around a porting bug with coreutils 8.22 on AIX 7.1. + 2014-06-11 Daiki Ueno gettext: update macros to version 0.19 diff --git a/lib/regex_internal.h b/lib/regex_internal.h index a0eae33e9a..bfce99f312 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -40,7 +40,7 @@ # define lock_fini(lock) 0 # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) -#elif defined GNULIB_LOCK +#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO # include "glthread/lock.h" /* Use gl_lock_define if empty macro arguments are known to work. Otherwise, fall back on less-portable substitutes. */ @@ -62,7 +62,7 @@ # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) # define lock_unlock(lock) glthread_lock_unlock (&(lock)) -#elif defined GNULIB_PTHREAD +#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO # include # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0)