1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Fix compilation on Cygwin when SQLITE_MAX_WORKER_THREADS is greater than zero.

FossilOrigin-Name: 2037442c582e51d85967bc911ea4a412eb4da573
This commit is contained in:
mistachkin
2015-01-19 20:05:53 +00:00
parent e4bb23a1a7
commit 89ea0d379a
4 changed files with 22 additions and 11 deletions

View File

@@ -74,4 +74,15 @@
# define SQLITE_WIN32_VOLATILE volatile
#endif
/*
** For some Windows sub-platforms, the _beginthreadex() / _endthreadex()
** functions are not available (e.g. those not using MSVC, Cygwin, etc).
*/
#if SQLITE_OS_WIN && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \
SQLITE_THREADSAFE>0 && !defined(__CYGWIN__)
# define SQLITE_OS_WIN_THREADS 1
#else
# define SQLITE_OS_WIN_THREADS 0
#endif
#endif /* _OS_WIN_H_ */

View File

@@ -101,7 +101,7 @@ int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
/********************************* Win32 Threads ****************************/
#if SQLITE_OS_WIN && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_THREADSAFE>0
#if SQLITE_OS_WIN_THREADS
#define SQLITE_THREADS_IMPLEMENTED 1 /* Prevent the single-thread code below */
#include <process.h>
@@ -194,7 +194,7 @@ int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
return (rc==WAIT_OBJECT_0) ? SQLITE_OK : SQLITE_ERROR;
}
#endif /* SQLITE_OS_WIN && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT */
#endif /* SQLITE_OS_WIN_THREADS */
/******************************** End Win32 Threads *************************/