diff options
author | mattn <mattn.jp@gmail.com> | 2015-03-12 18:42:19 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2015-03-12 18:42:19 +0900 |
commit | 1b67b9f03b8d279fce1125609c00c12b6cd05460 (patch) | |
tree | 96543712a8a18e8a35cc38c75db8b9c48766cd68 | |
parent | Merge pull request #178 from antoni/master (diff) | |
parent | Link against pthread (diff) | |
download | golite-1b67b9f03b8d279fce1125609c00c12b6cd05460.tar.gz golite-1b67b9f03b8d279fce1125609c00c12b6cd05460.tar.xz |
Merge pull request #183 from stgraber/master
Fix gccgo support
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | _example/mod_vtable/sqlite3_mod_vtable.cc | 2 | ||||
-rw-r--r-- | backup.go | 2 | ||||
-rw-r--r-- | sqlite3-binding.c (renamed from sqlite3.c) | 0 | ||||
-rw-r--r-- | sqlite3-binding.h (renamed from sqlite3.h) | 0 | ||||
-rw-r--r-- | sqlite3.go | 3 | ||||
-rw-r--r-- | sqlite3ext.h | 2 |
7 files changed, 8 insertions, 5 deletions
@@ -50,7 +50,9 @@ License 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. diff --git a/_example/mod_vtable/sqlite3_mod_vtable.cc b/_example/mod_vtable/sqlite3_mod_vtable.cc index 4caf484..5bd4e66 100644 --- a/_example/mod_vtable/sqlite3_mod_vtable.cc +++ b/_example/mod_vtable/sqlite3_mod_vtable.cc @@ -1,6 +1,6 @@ #include <string> #include <sstream> -#include <sqlite3.h> +#include <sqlite3-binding.h> #include <sqlite3ext.h> #include <curl/curl.h> #include "picojson.h" @@ -6,7 +6,7 @@ package sqlite3 /* -#include <sqlite3.h> +#include <sqlite3-binding.h> #include <stdlib.h> */ import "C" diff --git a/sqlite3.c b/sqlite3-binding.c index 9228d24..9228d24 100644 --- a/sqlite3.c +++ b/sqlite3-binding.c diff --git a/sqlite3.h b/sqlite3-binding.h index e86d83f..e86d83f 100644 --- a/sqlite3.h +++ b/sqlite3-binding.h @@ -9,7 +9,8 @@ package sqlite3 #cgo CFLAGS: -std=gnu99 #cgo CFLAGS: -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -#include <sqlite3.h> +#cgo LDFLAGS: -lpthread +#include <sqlite3-binding.h> #include <stdlib.h> #include <string.h> diff --git a/sqlite3ext.h b/sqlite3ext.h index ecf93f6..7cc58b6 100644 --- a/sqlite3ext.h +++ b/sqlite3ext.h @@ -17,7 +17,7 @@ */ #ifndef _SQLITE3EXT_H_ #define _SQLITE3EXT_H_ -#include "sqlite3.h" +#include "sqlite3-binding.h" typedef struct sqlite3_api_routines sqlite3_api_routines; |