mirror of https://github.com/mattn/go-sqlite3.git
Thread safe
This commit is contained in:
parent
ea3ab4d8f5
commit
1fbcb3cdc2
14
sqlite3.go
14
sqlite3.go
|
@ -6,13 +6,17 @@
|
|||
package sqlite3
|
||||
|
||||
/*
|
||||
#ifdef _WIN32
|
||||
# define _localtime32(x) localtime(x)
|
||||
#endif
|
||||
#include <sqlite3.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <time.h>
|
||||
struct tm* _localtime32(const __time32_t *tm) {
|
||||
return localtime(tm);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
@ -25,6 +29,10 @@ package sqlite3
|
|||
# define SQLITE_OPEN_FULLMUTEX 0
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_THREADSAFE
|
||||
# define SQLITE_THREADSAFE
|
||||
#endif
|
||||
|
||||
static int
|
||||
_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
|
||||
#ifdef SQLITE_OPEN_URI
|
||||
|
|
Loading…
Reference in New Issue