Skip to content

Commit

Permalink
cgosqlite: cleanup the import layout some more
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed May 28, 2024
1 parent 751f54c commit 38d2414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
15 changes: 2 additions & 13 deletions cgosqlite/cgosqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,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
// // 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>
#include <string.h>
#include <time.h>

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

0 comments on commit 38d2414

Please sign in to comment.