-#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex)
-#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex)
+/* We jump through a hoop here to get a CCall EnterCriticalSection
+ and LeaveCriticalSection, as that's what C-- wants. */
+
+#define ACQUIRE_LOCK(mutex) foreign "stdcall" EnterCriticalSection(mutex)
+#define RELEASE_LOCK(mutex) foreign "stdcall" LeaveCriticalSection(mutex)