From 1bb4be17d8e806b20e6f3b08df889759afc2ca8d Mon Sep 17 00:00:00 2001 From: spaceface Date: Tue, 9 Feb 2021 11:44:18 +0100 Subject: [PATCH] cgen: remove srwlock definition workaround for tcc on windows (#8652) --- vlib/sync/sync_windows.c.v | 2 ++ vlib/v/gen/c/cheaders.v | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/vlib/sync/sync_windows.c.v b/vlib/sync/sync_windows.c.v index e5f53ca9fb..2a3e365b10 100644 --- a/vlib/sync/sync_windows.c.v +++ b/vlib/sync/sync_windows.c.v @@ -5,6 +5,8 @@ module sync import time +#include + fn C.InitializeConditionVariable(voidptr) fn C.WakeConditionVariable(voidptr) fn C.SleepConditionVariableSRW(voidptr, voidptr, u32, u32) int diff --git a/vlib/v/gen/c/cheaders.v b/vlib/v/gen/c/cheaders.v index e4aac76505..6a9329a4f3 100644 --- a/vlib/v/gen/c/cheaders.v +++ b/vlib/v/gen/c/cheaders.v @@ -280,14 +280,6 @@ $c_common_macros #pragma comment(lib, "Dbghelp") extern wchar_t **_wenviron; - #elif !defined(SRWLOCK_INIT) - // these seem to be missing on Windows tcc - typedef struct SRWLOCK { void* SRWLOCK; } SRWLOCK; - void InitializeSRWLock(void*); - void AcquireSRWLockShared(void*); - void AcquireSRWLockExclusive(void*); - void ReleaseSRWLockShared(void*); - void ReleaseSRWLockExclusive(void*); #endif #else #include