summary refs log tree commit diff stats
path: root/lib/std/sysatomics.nim
diff options
context:
space:
mode:
authorrockcavera <rockcavera@gmail.com>2022-11-29 16:07:17 -0300
committerGitHub <noreply@github.com>2022-11-29 14:07:17 -0500
commit9c5061eab7669f930d84a7a61c5cde30eb6439d7 (patch)
tree96aa8067327887d74e7c19262ec392669ae1c20d /lib/std/sysatomics.nim
parent09b8f989b48fd22b0a3ec2c5c48b5f1d22460506 (diff)
downloadNim-9c5061eab7669f930d84a7a61c5cde30eb6439d7.tar.gz
fix #20969 - making vcc work again with cpp backend (#20970)
Update sysatomics.nim
Diffstat (limited to 'lib/std/sysatomics.nim')
-rw-r--r--lib/std/sysatomics.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/sysatomics.nim b/lib/std/sysatomics.nim
index 46a2a79cb..b7ccb4092 100644
--- a/lib/std/sysatomics.nim
+++ b/lib/std/sysatomics.nim
@@ -190,12 +190,12 @@ elif someVcc:
     proc interlockedCompareExchange64(p: pointer; exchange, comparand: int64): int64
       {.importcpp: "_InterlockedCompareExchange64(static_cast<NI64 volatile *>(#), #, #)", header: "<intrin.h>".}
     proc interlockedCompareExchange32(p: pointer; exchange, comparand: int32): int32
-      {.importcpp: "_InterlockedCompareExchange(static_cast<NI volatile *>(#), #, #)", header: "<intrin.h>".}
+      {.importcpp: "_InterlockedCompareExchange(static_cast<long volatile *>(#), #, #)", header: "<intrin.h>".}
     proc interlockedCompareExchange8(p: pointer; exchange, comparand: byte): byte
       {.importcpp: "_InterlockedCompareExchange8(static_cast<char volatile *>(#), #, #)", header: "<intrin.h>".}
     proc interlockedExchange8(location: pointer; desired: int8): int8 {.importcpp: "_InterlockedExchange8(static_cast<NI8 volatile *>(#), #)", header: "<intrin.h>".}
     proc interlockedExchange16(location: pointer; desired: int16): int16 {.importcpp: "_InterlockedExchange16(static_cast<NI16 volatile *>(#), #)", header: "<intrin.h>".}
-    proc interlockedExchange32(location: pointer; desired: int32): int32 {.importcpp: "_InterlockedExchange(static_cast<NI volatile *>(#), #)", header: "<intrin.h>".}
+    proc interlockedExchange32(location: pointer; desired: int32): int32 {.importcpp: "_InterlockedExchange(static_cast<long volatile *>(#), #)", header: "<intrin.h>".}
     proc interlockedExchange64(location: pointer; desired: int64): int64 {.importcpp: "_InterlockedExchange64(static_cast<NI64 volatile *>(#), #)", header: "<intrin.h>".}
   else:
     proc interlockedCompareExchange64(p: pointer; exchange, comparand: int64): int64