Merge pull request #183 from stgraber/master

Fix gccgo support
This commit is contained in:
mattn 2015-03-12 18:42:19 +09:00
commit 1b67b9f03b
7 changed files with 8 additions and 5 deletions

View File

@ -50,7 +50,9 @@ License
MIT: http://mattn.mit-license.org/2012 MIT: http://mattn.mit-license.org/2012
sqlite.c, sqlite3.h, sqlite3ext.h sqlite3-binding.c, sqlite3-binding.h, sqlite3ext.h
The -binding suffix was added to avoid build failures under gccgo.
In this repository, those files are amalgamation code that copied from SQLite3. The license of those codes are depend on the license of SQLite3. In this repository, those files are amalgamation code that copied from SQLite3. The license of those codes are depend on the license of SQLite3.

View File

@ -1,6 +1,6 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <sqlite3.h> #include <sqlite3-binding.h>
#include <sqlite3ext.h> #include <sqlite3ext.h>
#include <curl/curl.h> #include <curl/curl.h>
#include "picojson.h" #include "picojson.h"

View File

@ -6,7 +6,7 @@
package sqlite3 package sqlite3
/* /*
#include <sqlite3.h> #include <sqlite3-binding.h>
#include <stdlib.h> #include <stdlib.h>
*/ */
import "C" import "C"

View File

@ -9,7 +9,8 @@ package sqlite3
#cgo CFLAGS: -std=gnu99 #cgo CFLAGS: -std=gnu99
#cgo CFLAGS: -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE #cgo CFLAGS: -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE
#cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
#include <sqlite3.h> #cgo LDFLAGS: -lpthread
#include <sqlite3-binding.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -17,7 +17,7 @@
*/ */
#ifndef _SQLITE3EXT_H_ #ifndef _SQLITE3EXT_H_
#define _SQLITE3EXT_H_ #define _SQLITE3EXT_H_
#include "sqlite3.h" #include "sqlite3-binding.h"
typedef struct sqlite3_api_routines sqlite3_api_routines; typedef struct sqlite3_api_routines sqlite3_api_routines;