[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Mon Apr 25 23:20:04 UTC 2016
The branch, master has been updated
via 53e0860 Fix CHECK_CODE usage in atomics builtin detection
from ad5a4a9 ctdbd_conn: Make "cstatus" int32_t
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 53e0860122c3fa6b9fe80b5693c7b1eee2ad605d
Author: Jérémie Courrèges-Anglas <jca at wxcvbn.org>
Date: Mon Apr 25 16:10:03 2016 +0200
Fix CHECK_CODE usage in atomics builtin detection
CHECK_CODE already wraps the code with main(). Adding another layer
results in a nested function, eg
int main(void) { int main(void) { __sync_fetch_and_add(); } }
Since the inner function isn't called it is optimized out at cc -O2,
thus the linker doesn't fail if __sync_fetch_and_add() isn't available.
Issue noticed on OpenBSD/hppa.
Signed-off-by: Jérémie Courrèges-Anglas <jca at wxcvbn.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Apr 26 01:19:40 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
lib/replace/wscript | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 37cbbb7..5efd86c 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -202,23 +202,15 @@ def configure(conf):
# Check for atomic builtins. */
conf.CHECK_CODE('''
- int main(void) {
- int i;
- (void)__sync_fetch_and_add(&i, 1);
- return 0;
- }
+ int i;
+ (void)__sync_fetch_and_add(&i, 1);
''',
'HAVE___SYNC_FETCH_AND_ADD',
msg='Checking for __sync_fetch_and_add compiler builtin')
conf.CHECK_CODE('''
- #include <stdint.h>
- #include <sys/atomic.h>
- int main(void) {
- int32_t i;
- atomic_add_32(&i, 1);
- return 0;
- }
+ int32_t i;
+ atomic_add_32(&i, 1);
''',
'HAVE_ATOMIC_ADD_32',
headers='stdint.h sys/atomic.h',
--
Samba Shared Repository
More information about the samba-cvs
mailing list