aboutsummaryrefslogtreecommitdiff
path: root/sqlite3-binding.h
diff options
context:
space:
mode:
authorChristian Brauner <christian.brauner@canonical.com>2016-10-17 14:28:16 +0200
committerChristian Brauner <christian.brauner@canonical.com>2016-10-28 10:28:17 +0200
commitf6e7921d24a633f15e039189b0c06889f0c5e4a5 (patch)
treedcbb01b3e8a22506512efac47a5a34880e0da134 /sqlite3-binding.h
parentMerge pull request #333 from nyarly/master (diff)
downloadgolite-f6e7921d24a633f15e039189b0c06889f0c5e4a5.tar.gz
golite-f6e7921d24a633f15e039189b0c06889f0c5e4a5.tar.xz
actually link to <sqlite3.h> when -tags libsqlite3
Building with -tags libsqlite3 used the sqlite3.h from the system but the go compiler will compile all *.{c,h} files in the same direcory: "When the Go tool sees that one or more Go files use the special import "C", it will look for other non-Go files in the directory and compile them as part of the Go package. Any .c, .s, or .S files will be compiled with the C compiler." (https://golang.org/cmd/cgo/) So if users actually want to link against the system sqlite3 we should make sqlite3-binding.* a noop. Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
Diffstat (limited to 'sqlite3-binding.h')
-rw-r--r--sqlite3-binding.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sqlite3-binding.h b/sqlite3-binding.h
index 4e2df5e..430ffee 100644
--- a/sqlite3-binding.h
+++ b/sqlite3-binding.h
@@ -30,6 +30,7 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
*/
+#ifndef USE_LIBSQLITE3
#ifndef SQLITE3_H
#define SQLITE3_H
#include <stdarg.h> /* Needed for the definition of va_list */
@@ -10338,5 +10339,9 @@ struct fts5_api {
#endif
#endif /* _FTS5_H */
+#else // USE_LIBSQLITE3
+// If users really want to link against the system sqlite3 we
+// need to make this file a noop.
+#endif
/******** End of fts5.h *********/