Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ void cthreads_thread_exit(void *code) {
#endif

#ifdef _WIN32
#if defined __WATCOMC__ || _MSC_VER || __DMC__
/* NOTE: This gives warnings on MSVC, so I removed this
* for the oldest version of it I could test (19.20). */
/* TODO: Test with the other described compilers if this
* is REALLY necessary. */
#if defined __WATCOMC__ || _MSC_VER < 1920 || __DMC__
ExitThread((DWORD)code);
#else
ExitThread((DWORD)(uintptr_t)code);
Expand Down Expand Up @@ -323,6 +327,8 @@ int cthreads_cond_destroy(struct cthreads_cond *cond) {
#endif

#ifdef _WIN32
(void) cond;

return 0;
#else
return pthread_cond_destroy(&cond->pCond);
Expand Down
2 changes: 2 additions & 0 deletions cthreads.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ struct cthreads_args {
};

#ifdef _WIN32
/* MSVC sees strncpy() as insecure. */
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#define CTHREADS_SEMAPHORE 1
#else
Expand Down