sqlite: more windows work. not quite working yet.

Change-Id: I2f724ef8a923497d6d10d2aa2079d0c62c79b55f
This commit is contained in:
Brad Fitzpatrick 2011-07-21 11:00:12 -07:00
parent f349ccfeab
commit 23498e85b6
3 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
# error Not working on Windows yet
# define __USE_MINGW_ANSI_STDIO 0
# include <stdio.h>
#elif defined(__unix__)
# define SQLITE_OS_OTHER 1
#else

View File

@ -3,9 +3,12 @@ package sqlite
/*
#cgo linux CFLAGS: -D_GNU_SOURCE -D_XOPEN_SOURCE=500
#cgo linux LDFLAGS: -lpthread
#cgo windows CFLAGS: -D_GNU_SOURCE
#cgo windows LDFLAGS: -lpthread -lgcc_s -lmingwex -lmsvcrt
#include "go-sqlite.h"
#include <stdlib.h>
#include "go-sqlite.h"
static int my_bind_text(sqlite3_stmt *stmt, int n, char *p, int np) {
return sqlite3_bind_text(stmt, n, p, np, SQLITE_TRANSIENT);

View File

@ -1,11 +1,11 @@
#include "go-sqlite.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "_cgo_export.h"
#include "go-sqlite.h"
static sqlite3_io_methods g_file_methods;
typedef struct GoFile GoFile;