From 4892e42f7d4c2aeb3b1632cf52a1be52daea75dd Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Sat, 23 Mar 2013 12:02:18 +0100 Subject: [PATCH] Use single file for cgo directives --- sqlite3_c.go | 12 ++++++++++++ sqlite3_darwin.go | 6 ------ sqlite3_other.go | 9 --------- sqlite3_windows.go | 7 ------- 4 files changed, 12 insertions(+), 22 deletions(-) create mode 100644 sqlite3_c.go delete mode 100644 sqlite3_darwin.go delete mode 100644 sqlite3_other.go delete mode 100644 sqlite3_windows.go diff --git a/sqlite3_c.go b/sqlite3_c.go new file mode 100644 index 0000000..8bb5006 --- /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: -dl +#cgo freebsd LDFLAGS: -dl +#cgo netbsd LDFLAGS: -dl +#cgo openbsd LDFLAGS: -dl +*/ +import "C" diff --git a/sqlite3_darwin.go b/sqlite3_darwin.go deleted file mode 100644 index b87c1a1..0000000 --- a/sqlite3_darwin.go +++ /dev/null @@ -1,6 +0,0 @@ -package sqlite - -/* -#cgo CFLAGS: -I. -*/ -import "C" diff --git a/sqlite3_other.go b/sqlite3_other.go deleted file mode 100644 index b97dae4..0000000 --- a/sqlite3_other.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build !windows, !darwin - -package sqlite - -/* -#cgo CFLAGS: -I. -#cgo LDFLAGS: -ldl -*/ -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"