mirror of https://github.com/perkeep/perkeep.git
more static sqlite work
Change-Id: I9232a929087cce4a0ae893228bd01cf32ef764fe
This commit is contained in:
parent
936d9e27c7
commit
c91c3b1dab
|
@ -6,4 +6,7 @@ CGOFILES=\
|
|||
vfs.go\
|
||||
sqlite.go\
|
||||
|
||||
CGO_OFILES=\
|
||||
sqlite3_os_go.o\
|
||||
|
||||
include $(GOROOT)/src/Make.pkg
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
package sqlite
|
||||
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -D_GNU_SOURCE -D_XOPEN_SOURCE=500
|
||||
#cgo LDFLAGS: -ldl -lpthread
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SQLITE_OS_OTHER 1
|
||||
#include "sqlite3.c"
|
||||
#include "sqlite3_os_go.c"
|
||||
#include "sqlite3.h"
|
||||
|
||||
static int my_bind_text(sqlite3_stmt *stmt, int n, char *p, int np) {
|
||||
return sqlite3_bind_text(stmt, n, p, np, SQLITE_TRANSIENT);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,7 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
#include "_cgo_export.h"
|
||||
#define SQLITE_OS_OTHER 1
|
||||
#include "sqlite3.c"
|
||||
|
||||
typedef struct GoFile GoFile;
|
||||
struct GoFile {
|
||||
|
|
|
@ -4,11 +4,6 @@ import "C"
|
|||
|
||||
//export GoVFSOpen
|
||||
// fd is -1 on error.
|
||||
func GoVFSOpen(filename *C.char, flags C.int) (fd int, isReadOnly bool) {
|
||||
return -1, false
|
||||
}
|
||||
|
||||
//export GoStart
|
||||
func GoStart(i, xdim, ydim, xstart, xend, ystart, yend C.int, a *C.int, n *C.int) (int, int) {
|
||||
return 1, 2
|
||||
func GoVFSOpen(filename *C.char, flags C.int) (int, int) {
|
||||
return -1, 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue