summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-07-18 08:54:22 +0200
committerRalph Boehme <slow@samba.org>2018-07-24 17:38:26 +0200
commit6f8c1b6736875d63c11f8630ecf1c8d3dcd70fc5 (patch)
tree1dac390293cf2842bd204e13caa58345ed783827 /third_party
parent2ebb5847defce888c3177d6564a3d7dcc0ed47e4 (diff)
downloadsamba-6f8c1b6736875d63c11f8630ecf1c8d3dcd70fc5.tar.gz
third_party/*_wrapper/wscript: remove redundant configure checks
HAVE___THREAD and HAVE_DESTRUCTOR_ATTRIBUTE are already checked as part of Samba. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nss_wrapper/wscript31
-rw-r--r--third_party/pam_wrapper/wscript30
-rw-r--r--third_party/resolv_wrapper/wscript30
-rw-r--r--third_party/socket_wrapper/wscript30
-rw-r--r--third_party/uid_wrapper/wscript12
5 files changed, 10 insertions, 123 deletions
diff --git a/third_party/nss_wrapper/wscript b/third_party/nss_wrapper/wscript
index d50dd5cbb17..a289d471032 100644
--- a/third_party/nss_wrapper/wscript
+++ b/third_party/nss_wrapper/wscript
@@ -11,35 +11,8 @@ def configure(conf):
else:
conf.CHECK_HEADERS('nss.h')
- # check HAVE_GCC_THREAD_LOCAL_STORAGE
- conf.CHECK_CODE('''
- __thread int tls;
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_GCC_THREAD_LOCAL_STORAGE',
- addmain=False,
- msg='Checking for thread local storage')
-
- # check HAVE_DESTRUCTOR_ATTRIBUTE
- conf.CHECK_CODE('''
- void test_destructor_attribute(void) __attribute__ ((destructor));
-
- void test_destructor_attribute(void)
- {
- return;
- }
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_DESTRUCTOR_ATTRIBUTE',
- addmain=False,
- strict=True,
- msg='Checking for library destructor support')
+ if conf.CONFIG_SET("HAVE___THREAD"):
+ conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
# check HAVE_ATTRIBUTE_PRINTF_FORMAT
conf.CHECK_CODE('''
diff --git a/third_party/pam_wrapper/wscript b/third_party/pam_wrapper/wscript
index 7d4a790caaa..1a1e3a29bf2 100644
--- a/third_party/pam_wrapper/wscript
+++ b/third_party/pam_wrapper/wscript
@@ -17,35 +17,9 @@ def configure(conf):
conf.DEFINE('USING_SYSTEM_PAM_WRAPPER', 1)
libpam_wrapper_so_path = 'libpam_wrapper.so'
else:
- # check HAVE_GCC_THREAD_LOCAL_STORAGE
- conf.CHECK_CODE('''
- __thread int tls;
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_GCC_THREAD_LOCAL_STORAGE',
- addmain=False,
- msg='Checking for thread local storage')
-
- # check HAVE_DESTRUCTOR_ATTRIBUTE
- conf.CHECK_CODE('''
- void test_destructor_attribute(void) __attribute__ ((destructor));
- void test_destructor_attribute(void)
- {
- return;
- }
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_DESTRUCTOR_ATTRIBUTE',
- addmain=False,
- strict=True,
- msg='Checking for library destructor support')
+ if conf.CONFIG_SET("HAVE___THREAD"):
+ conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
# check HAVE_FUNCTION_ATTRIBUTE_FORMAT
conf.CHECK_CODE('''
diff --git a/third_party/resolv_wrapper/wscript b/third_party/resolv_wrapper/wscript
index bb7722e9775..7cd1d90b8fa 100644
--- a/third_party/resolv_wrapper/wscript
+++ b/third_party/resolv_wrapper/wscript
@@ -9,35 +9,9 @@ def configure(conf):
conf.DEFINE('USING_SYSTEM_RESOLV_WRAPPER', 1)
libresolv_wrapper_so_path = 'libresolv_wrapper.so'
else:
- # check HAVE_GCC_THREAD_LOCAL_STORAGE
- conf.CHECK_CODE('''
- __thread int tls;
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_GCC_THREAD_LOCAL_STORAGE',
- addmain=False,
- msg='Checking for thread local storage')
-
- # check HAVE_DESTRUCTOR_ATTRIBUTE
- conf.CHECK_CODE('''
- void test_destructor_attribute(void) __attribute__ ((destructor));
- void test_destructor_attribute(void)
- {
- return;
- }
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_DESTRUCTOR_ATTRIBUTE',
- addmain=False,
- strict=True,
- msg='Checking for library destructor support')
+ if conf.CONFIG_SET("HAVE___THREAD"):
+ conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
# check HAVE_ATTRIBUTE_PRINTF_FORMAT
conf.CHECK_CODE('''
diff --git a/third_party/socket_wrapper/wscript b/third_party/socket_wrapper/wscript
index f48debe8b15..a0ee4f2f932 100644
--- a/third_party/socket_wrapper/wscript
+++ b/third_party/socket_wrapper/wscript
@@ -9,35 +9,9 @@ def configure(conf):
conf.DEFINE('USING_SYSTEM_SOCKET_WRAPPER', 1)
libsocket_wrapper_so_path = 'libsocket_wrapper.so'
else:
- # check HAVE_GCC_THREAD_LOCAL_STORAGE
- conf.CHECK_CODE('''
- __thread int tls;
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_GCC_THREAD_LOCAL_STORAGE',
- addmain=False,
- msg='Checking for thread local storage')
-
- # check HAVE_DESTRUCTOR_ATTRIBUTE
- conf.CHECK_CODE('''
- void test_destructor_attribute(void) __attribute__ ((destructor));
- void test_destructor_attribute(void)
- {
- return;
- }
-
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_DESTRUCTOR_ATTRIBUTE',
- addmain=False,
- strict=True,
- msg='Checking for library destructor support')
+ if conf.CONFIG_SET("HAVE___THREAD"):
+ conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
# check HAVE_FUNCTION_ATTRIBUTE_FORMAT
conf.CHECK_CODE('''
diff --git a/third_party/uid_wrapper/wscript b/third_party/uid_wrapper/wscript
index 6344ebf5eba..8127a9d9f40 100644
--- a/third_party/uid_wrapper/wscript
+++ b/third_party/uid_wrapper/wscript
@@ -23,17 +23,9 @@ def configure(conf):
addmain=False,
msg='Checking for atomic builtins')
- # check HAVE_GCC_THREAD_LOCAL_STORAGE
- conf.CHECK_CODE('''
- __thread int tls;
- int main(void) {
- return 0;
- }
- ''',
- 'HAVE_GCC_THREAD_LOCAL_STORAGE',
- addmain=False,
- msg='Checking for thread local storage')
+ if conf.CONFIG_SET("HAVE___THREAD"):
+ conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
if Options.options.address_sanitizer:
# check HAVE_ADDRESS_SANITIZER_ATTRIBUTE