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

More HAVE_* defines #35

Open
mdevan opened this issue Aug 11, 2018 · 1 comment
Open

More HAVE_* defines #35

mdevan opened this issue Aug 11, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@mdevan
Copy link

mdevan commented Aug 11, 2018

You might want to add the following HAVE_* defines in sqlite.go:

#cgo CFLAGS: -DHAVE_FDATASYNC
#cgo CFLAGS: -DHAVE_GMTIME_R
#cgo CFLAGS: -DHAVE_ISNAN
#cgo CFLAGS: -DHAVE_LOCALTIME_R
#cgo linux CFLAGS: -DHAVE_STRCHRNUL
#cgo CFLAGS: -DHAVE_UTIME
#cgo CFLAGS: -DHAVE_STRERROR_R

These are true for most modern (g)libc systems. If you build from the un-amalgamated source, these are set by the configure script, but if you use sqlite3.c (like here), some are guessed, some are not (and built-in, slower implementations are substituted -- for example, osLocalTime() will lock a mutex and call localtime() if HAVE_LOCALTIME_R is not defined).

@crawshaw
Copy link
Owner

HAVE_UTIME is there as of a few days ago.

Some of the others look reasonable, but I need to confirm what the values should be on different OSs. E.g. should macOS use HAVE_FDATASYNC? A quick run of the sqlite configure script should answer it.

@AdamSLevy AdamSLevy added the enhancement New feature or request label Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants