]> Savannah Git Hosting - gnulib.git/commitdiff
setenv: Use tree code also with clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 16:39:33 +0000 (18:39 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 16:39:33 +0000 (18:39 +0200)
* lib/setenv.c (USE_TSEARCH): Treat clang like GCC.

ChangeLog
lib/setenv.c

index 2e78c4f0141c451f33b2830e30f2e1c385f408d4..b750f34335bd34c182a0ea67c003dea7169cc56f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       setenv: Use tree code also with clang.
+       * lib/setenv.c (USE_TSEARCH): Treat clang like GCC.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        math: Optimize signbit also on clang.
index d03bc5a6dfa4a15365bf2fef045fac1fab84056e..aede703ac63c8e1a25010e1de9f394e7c08584c4 100644 (file)
@@ -72,7 +72,7 @@ __libc_lock_define_initialized (static, envlock)
    values are from a small set.  Outside glibc this will eat up all
    memory after a while.  */
 #if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
-                      && defined __GNUC__)
+                      && (defined __GNUC__ || defined __clang__))
 # define USE_TSEARCH    1
 # include <search.h>
 typedef int (*compar_fn_t) (const void *, const void *);