diff options
author | Andrew Bartlett <abartlet@samba.org> | 2021-07-06 12:26:44 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-12-07 04:05:34 +0000 |
commit | a0d75b1cce4b97e1d6b78ba2b7adf96988d55608 (patch) | |
tree | 5b8e62c9a230442149df3dad602cfe849870963d /lib | |
parent | 2701293f48a9e4014f9ba1e925d458fe25865bfb (diff) | |
download | samba-a0d75b1cce4b97e1d6b78ba2b7adf96988d55608.tar.gz |
lib/replace: For heimdal_build: Try to use the OS or compiler provided atomic operators
This provides the defines that may be needed to use the
compiler-provided atomics, rather than a fallback.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/wscript | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript index 53cb5d4fa76..a928b80f2f7 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -299,6 +299,13 @@ def configure(conf): msg='Checking for __sync_fetch_and_add compiler builtin') conf.CHECK_CODE(''' + int i; + (void)__sync_add_and_fetch(&i, 1); + ''', + 'HAVE___SYNC_ADD_AND_FETCH', + msg='Checking for __sync_add_and_fetch compiler builtin') + + conf.CHECK_CODE(''' int32_t i; atomic_add_32(&i, 1); ''', |