From 62174f7330a4578faf2df6c108c0ee6ee5270325 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Mon, 12 Apr 2010 09:23:43 +0200 Subject: libc_regex: __libc_lock primitives are actually available on uClibc __libc_lock primitives are actually available on uClibc when threading support is enable, so in this case they can be used. It also fixes the following compiler warnings: In file included from libc/misc/regex/regex.c:55: libc/misc/regex/regex_internal.h:49:1: warning: "__libc_lock_define" redefined [SNIP] libc/misc/regex/regex_internal.h:50:1: warning: "__libc_lock_init" redefined [SNIP] libc/misc/regex/regex_internal.h:51:1: warning: "__libc_lock_lock" redefined [SNIP] libc/misc/regex/regex_internal.h:52:1: warning: "__libc_lock_unlock" redefined Signed-off-by: Carmelo Amoroso (cherry picked from commit 65f9ccdafd008abd9892dfc46fb9737ec4d964c5) Signed-off-by: Carmelo Amoroso --- libc/misc/regex/regex_internal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/misc/regex/regex_internal.h') diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h index 03f08bf52..0a255e37f 100644 --- a/libc/misc/regex/regex_internal.h +++ b/libc/misc/regex/regex_internal.h @@ -46,10 +46,14 @@ # include #endif +#ifdef __UCLIBC_HAS_THREADS__ +#include +#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) +#endif #undef gettext #undef gettext_noop -- cgit v1.2.3