]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove unused Z_TLS and HAVE_THREAD_LOCAL
authorVladislav Shchapov <vladislav@shchapov.ru>
Thu, 21 Dec 2023 16:19:34 +0000 (21:19 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 25 Dec 2023 19:47:24 +0000 (20:47 +0100)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
CMakeLists.txt
configure
zbuild.h

index 0cbc69a62d405d4ee5563f20ee8c9be4a9aebac1..58ed3a1a5585342bf6cfb3f75b65d580dccb8c7e 100644 (file)
@@ -427,21 +427,6 @@ if(HAVE_ATTRIBUTE_ALIGNED)
     add_definitions(-DHAVE_ATTRIBUTE_ALIGNED)
 endif()
 
-#
-# check for _Thread_local() support in the compiler
-#
-check_c_source_compiles(
-    "_Thread_local int test;
-    int main(void) {
-        (void)test;
-        return 0;
-    }"
-    HAVE_THREAD_LOCAL
-)
-if(HAVE_THREAD_LOCAL)
-    add_definitions(-DHAVE_THREAD_LOCAL)
-endif()
-
 #
 # check for __builtin_ctz() support in the compiler
 #
index 501f51badde196240b3bf0673c22e9ba59471a8b..e0187be0922d396c16b755ae2713d3f4ea8e4ef8 100755 (executable)
--- a/configure
+++ b/configure
@@ -973,22 +973,6 @@ else
     echo "Checking for attribute(aligned) ... No." | tee -a configure.log
 fi
 
-# Check for _Thread_local support in compiler
-cat > $test.c << EOF
-_Thread_local int test;
-int main(void) {
-    (void)test;
-    return 0;
-}
-EOF
-if try ${CC} ${CFLAGS} $test.c $LDSHAREDLIBC; then
-    echo "Checking for _Thread_local ... Yes." | tee -a configure.log
-    CFLAGS="$CFLAGS -DHAVE_THREAD_LOCAL"
-    SFLAGS="$SFLAGS -DHAVE_THREAD_LOCAL"
-else
-    echo "Checking for _Thread_local ... No." | tee -a configure.log
-fi
-
 # Check for __builtin_ctz() support in compiler
 cat > $test.c << EOF
 long f(unsigned int x) { return __builtin_ctz(x); }
index d78c3a15a2ae6a3e0b6a15b3868038a7ae9c6026..d550b4c582c33e08ec11976894f9b84dad7dce80 100644 (file)
--- a/zbuild.h
+++ b/zbuild.h
 #  endif
 #endif
 
-/* Determine compiler support for TLS */
-#ifndef Z_TLS
-#  ifdef HAVE_THREAD_LOCAL
-#    define Z_TLS _Thread_local
-#  elif defined(__GNUC__) || defined(__SUNPRO_C)
-#    define Z_TLS __thread
-#  elif defined(_WIN32) && (defined(_MSC_VER) || defined(__ICL))
-#    define Z_TLS __declspec(thread)
-#  else
-#    warning Unable to detect Thread Local Storage support.
-#    define Z_TLS
-#  endif
-#endif
-
 #ifndef Z_HAS_ATTRIBUTE
 #  if defined(__has_attribute)
 #    define Z_HAS_ATTRIBUTE(a) __has_attribute(a)