diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-04-08 20:54:42 +0200 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-04-08 21:00:42 +0200 |
commit | bdb07f8fc7b37ef64498c7b06cd4457faf456189 (patch) | |
tree | 4c98d2d714f2071513897efe01063bebc36e32cb /lib/regex_internal.h | |
parent | 88e703084567eb99238a3be6ba4285d87a25eeae (diff) | |
download | guile-bdb07f8fc7b37ef64498c7b06cd4457faf456189.tar.gz |
Update gnulib to a3a946f670718d0dee5a7425ad5ac0a29fb46ea1wip-gnulib-update
This fixes https://lists.gnu.org/archive/html/guile-devel/2021-04/msg00009.html
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r-- | lib/regex_internal.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h index b4f91d9ec..1245e782f 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -32,7 +32,10 @@ #include <stdbool.h> #include <stdint.h> -#include <dynarray.h> +#ifndef _LIBC +# include <dynarray.h> +#endif + #include <intprops.h> #include <verify.h> @@ -50,14 +53,14 @@ # define lock_fini(lock) ((void) 0) # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) -#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO +#elif defined GNULIB_LOCK && !defined GNULIB_REGEX_SINGLE_THREAD # include "glthread/lock.h" # define lock_define(name) gl_lock_define (, name) # define lock_init(lock) glthread_lock_init (&(lock)) # 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 && !defined USE_UNLOCKED_IO +#elif defined GNULIB_PTHREAD && !defined GNULIB_REGEX_SINGLE_THREAD # include <pthread.h> # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0) @@ -830,12 +833,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) } #endif /* RE_ENABLE_I18N */ -#ifndef FALLTHROUGH -# if (__GNUC__ >= 7) || (__clang_major__ >= 10) +#ifdef _LIBC +# if __GNUC__ >= 7 # define FALLTHROUGH __attribute__ ((__fallthrough__)) # else # define FALLTHROUGH ((void) 0) # endif +#else +# include "attribute.h" #endif #endif /* _REGEX_INTERNAL_H */ |