Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgosqlite: cleanup the import layout some more #101

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions cgosqlite/cgosqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,10 @@ package cgosqlite
// // Select POSIX 2014 at least for clock_gettime.
// #cgo CFLAGS: -D_XOPEN_SOURCE=600
// #cgo CFLAGS: -D_DARWIN_C_SOURCE=1
// #cgo linux CFLAGS: -std=c99
//
// // On Android, unlike Linux, there are no separate libpthread or librt
raggi marked this conversation as resolved.
Show resolved Hide resolved
// // libraries. That functionality is included directly in libc, which does not
// // need to be explicitly linked against. See
// // https://developer.android.com/ndk/guides/stable_apis#c_library.
// #cgo android LDFLAGS: -ldl -lm
// #cgo linux,!android LDFLAGS: -ldl -lm -lrt
// // libm is required by the FTS5 extension, on Linux.
// #cgo linux LDFLAGS: -lm
//
// #include <stdint.h>
// #include <stdlib.h>
// #include <string.h>
// #include <pthread.h>
// #include <sqlite3.h>
// #include <time.h>
// #include "cgosqlite.h"
import "C"
import (
Expand Down
4 changes: 4 additions & 0 deletions cgosqlite/cgosqlite.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#include <math.h> // math.h is required on linux for FTS5.
#include "sqlite3.h"
#include <stdlib.h>
#include <stdint.h>
raggi marked this conversation as resolved.
Show resolved Hide resolved
#include <string.h>
#include <time.h>

// uintptr versions of sqlite3 pointer types, to avoid allocations
Expand Down
Loading