From 0505c52d3cb0cb35aee6a09b589194c797fe7987 Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Sat, 23 Mar 2013 11:30:43 +0100 Subject: [PATCH] Use sqlite amalgamation source on all platforms This removes the need for linking against the sqlite3 dynamic library and provides a more standalone go library --- sqlite3_windows.c => sqlite3.c | 0 sqlite3_c.go | 12 ++++++++++++ sqlite3_other.go | 8 -------- sqlite3_windows.go | 7 ------- 4 files changed, 12 insertions(+), 15 deletions(-) rename sqlite3_windows.c => sqlite3.c (100%) create mode 100644 sqlite3_c.go delete mode 100644 sqlite3_other.go delete mode 100644 sqlite3_windows.go diff --git a/sqlite3_windows.c b/sqlite3.c similarity index 100% rename from sqlite3_windows.c rename to sqlite3.c diff --git a/sqlite3_c.go b/sqlite3_c.go new file mode 100644 index 0000000..f181188 --- /dev/null +++ b/sqlite3_c.go @@ -0,0 +1,12 @@ +package sqlite + +/* +#cgo CFLAGS: -I. +#cgo windows CFLAGS: -fno-stack-check -fno-stack-protector -mno-stack-arg-probe +#cgo windows LDFLAGS: -lmingwex -lmingw32 +#cgo linux LDFLAGS: -ldl +#cgo freebsd LDFLAGS: -ldl +#cgo netbsd LDFLAGS: -ldl +#cgo openbsd LDFLAGS: -ldl +*/ +import "C" diff --git a/sqlite3_other.go b/sqlite3_other.go deleted file mode 100644 index 58030db..0000000 --- a/sqlite3_other.go +++ /dev/null @@ -1,8 +0,0 @@ -// +build !windows - -package sqlite - -/* -#cgo pkg-config: sqlite3 -*/ -import "C" diff --git a/sqlite3_windows.go b/sqlite3_windows.go deleted file mode 100644 index 322400f..0000000 --- a/sqlite3_windows.go +++ /dev/null @@ -1,7 +0,0 @@ -package sqlite - -/* -#cgo CFLAGS: -I. -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -#cgo LDFLAGS: -lmingwex -lmingw32 -*/ -import "C"