Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
0152-win-Allow-_Interlocked-configure-checks-to...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0152-win-Allow-_Interlocked-configure-checks-to-be-cached.patch of Package erlang
From 05687447e5b5928af5413ed8cb9ab6dd697085ee Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Mon, 20 Jun 2022 10:53:06 +0200 Subject: [PATCH 2/4] win: Allow _Interlocked configure checks to be cached --- erts/configure | 993 ++++++++++++++++++++++++++----------------- make/autoconf/otp.m4 | 65 +-- 2 files changed, 644 insertions(+), 414 deletions(-) diff --git a/erts/configure b/erts/configure index 3a563fd0e4..a287a59d20 100755 --- a/erts/configure +++ b/erts/configure @@ -10353,31 +10353,35 @@ printf "%s\n" "#define ETHR_WIN32_THREADS 1" >>confdefs.h else ilckd="_InterlockedDecrement" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedDecrement+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedDecrement=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10385,43 +10389,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedDecrement=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedDecrement" >&6; } + if [ "${ethr_cv_have__InterlockedDecrement}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedDecrement_rel" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedDecrement_rel+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedDecrement_rel=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10429,43 +10442,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedDecrement_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement_rel" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedDecrement_rel" >&6; } + if [ "${ethr_cv_have__InterlockedDecrement_rel}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT_REL 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedIncrement" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedIncrement+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedIncrement=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10473,43 +10495,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedIncrement=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedIncrement" >&6; } + if [ "${ethr_cv_have__InterlockedIncrement}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedIncrement_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedIncrement_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedIncrement_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10517,43 +10548,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedIncrement_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedIncrement_acq" >&6; } + if [ "${ethr_cv_have__InterlockedIncrement_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchangeAdd" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchangeAdd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchangeAdd=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10561,43 +10601,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchangeAdd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd" >&6; } + if [ "${ethr_cv_have__InterlockedExchangeAdd}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchangeAdd_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchangeAdd_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchangeAdd_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10605,43 +10654,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchangeAdd_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd_acq" >&6; } + if [ "${ethr_cv_have__InterlockedExchangeAdd_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedAnd" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedAnd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedAnd=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10649,43 +10707,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedAnd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedAnd" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedAnd" >&6; } + if [ "${ethr_cv_have__InterlockedAnd}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDAND 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedOr" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedOr+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedOr=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10693,43 +10760,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedOr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedOr" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedOr" >&6; } + if [ "${ethr_cv_have__InterlockedOr}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDOR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchange" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchange+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchange=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10737,43 +10813,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchange=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchange" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchange" >&6; } + if [ "${ethr_cv_have__InterlockedExchange}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedCompareExchange" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10781,44 +10866,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + ethr_have_native_atomics=yes + else + : + fi - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10826,44 +10920,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange_acq" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + ethr_have_native_atomics=yes + else + : + fi - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange_rel" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange_rel+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange_rel=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile long *var; - volatile long arr[2]; + volatile long *var; + volatile long arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10871,45 +10974,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && -printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL 1" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange_rel" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange_rel" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange_rel}" = "yes" ]; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } +printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL 1" >>confdefs.h - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes + ethr_have_native_atomics=yes + else + : + fi ilckd="_InterlockedDecrement64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedDecrement64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedDecrement64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10917,43 +11028,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedDecrement64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedDecrement64" >&6; } + if [ "${ethr_cv_have__InterlockedDecrement64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedDecrement64_rel" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedDecrement64_rel+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedDecrement64_rel=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -10961,43 +11081,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedDecrement64_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement64_rel" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedDecrement64_rel" >&6; } + if [ "${ethr_cv_have__InterlockedDecrement64_rel}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT64_REL 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedIncrement64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedIncrement64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedIncrement64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11005,43 +11134,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedIncrement64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedIncrement64" >&6; } + if [ "${ethr_cv_have__InterlockedIncrement64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedIncrement64_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedIncrement64_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedIncrement64_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11049,43 +11187,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedIncrement64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement64_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedIncrement64_acq" >&6; } + if [ "${ethr_cv_have__InterlockedIncrement64_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchangeAdd64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchangeAdd64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchangeAdd64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11093,43 +11240,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchangeAdd64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd64" >&6; } + if [ "${ethr_cv_have__InterlockedExchangeAdd64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchangeAdd64_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchangeAdd64_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchangeAdd64_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11137,43 +11293,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchangeAdd64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd64_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd64_acq" >&6; } + if [ "${ethr_cv_have__InterlockedExchangeAdd64_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedAnd64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedAnd64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedAnd64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11181,43 +11346,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedAnd64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedAnd64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedAnd64" >&6; } + if [ "${ethr_cv_have__InterlockedAnd64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDAND64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedOr64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedOr64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedOr64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11225,43 +11399,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedOr64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedOr64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedOr64" >&6; } + if [ "${ethr_cv_have__InterlockedOr64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDOR64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedExchange64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedExchange64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedExchange64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11269,43 +11452,52 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedExchange64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchange64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedExchange64" >&6; } + if [ "${ethr_cv_have__InterlockedExchange64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGE64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi ilckd="_InterlockedCompareExchange64" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange64=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11313,44 +11505,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange64}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + ethr_have_native_atomics=yes + else + : + fi - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange64_acq" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange64_acq+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange64_acq=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11358,44 +11559,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64_acq" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64_acq" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange64_acq}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + ethr_have_native_atomics=yes + else + : + fi - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange64_rel" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange64_rel+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange64_rel=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11403,45 +11613,53 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange64_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && -printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL 1" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64_rel" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64_rel" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange64_rel}" = "yes" ]; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } +printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL 1" >>confdefs.h - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes + ethr_have_native_atomics=yes + else + : + fi ilckd="_InterlockedCompareExchange128" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 -printf %s "checking for ${ilckd}()... " >&6; } case "4" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac - have_interlocked_op=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 +printf %s "checking for ${ilckd}()... " >&6; } +if test ${ethr_cv_have__InterlockedCompareExchange128+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ethr_cv_have__InterlockedCompareExchange128=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> int main (void) { - volatile __int64 *var; - volatile __int64 arr[2]; + volatile __int64 *var; + volatile __int64 arr[2]; - $ilckd_call - return 0; + $ilckd_call + return 0; ; return 0; @@ -11449,15 +11667,20 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - have_interlocked_op=yes + ethr_cv_have__InterlockedCompareExchange128=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - test $have_interlocked_op = yes && +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange128" >&5 +printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange128" >&6; } + if [ "${ethr_cv_have__InterlockedCompareExchange128}" = "yes" ]; then + printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 -printf "%s\n" "$have_interlocked_op" >&6; } + else + : + fi fi if test "$ethr_have_native_atomics" = "yes"; then @@ -16918,9 +17141,9 @@ then : try_dlpi_lib=$erl_xcomp_sysroot/lib if test x"$ac_cv_sizeof_void_p" = x"8"; then if test -d $erl_xcomp_sysroot/lib64; then - try_dlpi_lib= $erl_xcomp_sysroot/lib64 + try_dlpi_lib=$erl_xcomp_sysroot/lib64 elif test -d $erl_xcomp_sysroot/lib/64; then - try_dlpi_lib= $erl_xcomp_sysroot/lib/64 + try_dlpi_lib=$erl_xcomp_sysroot/lib/64 fi fi if test ! -f "$try_dlpi_lib/libdlpi.so" && \ diff --git a/make/autoconf/otp.m4 b/make/autoconf/otp.m4 index 7b2e81328d..2f06fc92cc 100644 --- a/make/autoconf/otp.m4 +++ b/make/autoconf/otp.m4 @@ -1480,27 +1480,30 @@ AC_DEFUN(ETHR_CHK_GCC_ATOMIC_OPS, AC_DEFUN(ETHR_CHK_INTERLOCKED, [ ilckd="$1" - AC_MSG_CHECKING([for ${ilckd}()]) case "$2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, ($3) 0);";; "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";; "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";; esac - have_interlocked_op=no - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #define WIN32_LEAN_AND_MEAN - #include <windows.h> - #include <intrin.h> - ]], [[ - volatile $3 *var; - volatile $3 arr[2]; - - $ilckd_call - return 0; - ]])],[have_interlocked_op=yes],[]) - test $have_interlocked_op = yes && $4 - AC_MSG_RESULT([$have_interlocked_op]) + AC_CACHE_CHECK([for ${ilckd}()],ethr_cv_have_$1, + [ethr_cv_have_$1=no + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <intrin.h> + ]], [[ + volatile $3 *var; + volatile $3 arr[2]; + + $ilckd_call + return 0; + ]])],[ethr_cv_have_$1=yes],[])]) + if [[ "${ethr_cv_have_$1}" = "yes" ]]; then + $4 + else + m4_default([$5], [:]) + fi ]) dnl ---------------------------------------------------------------------- @@ -1687,13 +1690,15 @@ AS_CASE( ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()])) ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()])) ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()])) - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]) + ethr_have_native_atomics=yes]) + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]) + ethr_have_native_atomics=yes]) + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]) + ethr_have_native_atomics=yes]) ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()])) ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()])) ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()])) @@ -1703,13 +1708,15 @@ AS_CASE( ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()])) ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()])) ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()])) - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()])) - test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes - + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]) + ethr_have_native_atomics=yes]) + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]) + ethr_have_native_atomics=yes]) + ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], + [AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]) + ethr_have_native_atomics=yes]) ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()])) fi if test "$ethr_have_native_atomics" = "yes"; then -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor