[Bug 241385] databases/sqlite3: enable OS features
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Apr 16 07:05:47 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241385
--- Comment #10 from rozhuk.im at gmail.com ---
Already in Makefile:
-DHAVE_ISNAN=1 \
-DHAVE_MALLOC_USABLE_SIZE=1 \
-DHAVE_GMTIME_R=1 \
-DHAVE_LOCALTIME_R=1 \
-DHAVE_USLEEP=1 \
-DHAVE_STRCHRNUL=1 \
New to add:
-DHAVE_DECL_STRERROR_R=1 \
Looks like it was removed from sqlite since last time I dig into it or used
some where outside amalgama, removed from this patch.
-DHAVE_FCHOWN=1 \
https://www.freebsd.org/cgi/man.cgi?query=fchown&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The fchown() system call appeared in 4.2BSD.
Defined for non VxWorks.
-DHAVE_FDATASYNC=1 \
https://www.freebsd.org/cgi/man.cgi?query=fdatasync&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The fdatasync() system call appeared in FreeBSD 11.1.
-DHAVE_GETHOSTUUID=1 \
gethostuuid() - apple specific, removed from this patch.
-DHAVE_LOCALTIME_S=1 \
localtime_s() - not used if HAVE_LOCALTIME_R
looks like windows specific, removed from this patch.
-DHAVE_LSTAT=1 \
https://www.freebsd.org/cgi/man.cgi?query=lstat&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The lstat() system call appeared in 4.2BSD.
Defined for non VxWorks.
-DHAVE_POSIX_FALLOCATE=1 \
https://www.freebsd.org/cgi/man.cgi?query=posix_fallocate&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The posix_fallocate() function appeared in FreeBSD 9.0.
-DHAVE_PREAD=1 \
https://www.freebsd.org/cgi/man.cgi?query=pread&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The pread() function appeared in AT&T System V Release 4 UNIX.
-DHAVE_PWRITE=1 \
https://www.freebsd.org/cgi/man.cgi?query=pwrite&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The pwrite() function appeared in AT&T System V Release 4 UNIX.
-DHAVE_STRERROR_R=1 \
https://www.freebsd.org/cgi/man.cgi?query=strerror_r&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
strerror_r() function was implemented in FreeBSD 4.4
-DHAVE_READLINK=1 \
https://www.freebsd.org/cgi/man.cgi?query=readlink&apropos=0&sektion=2&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
The readlink() system call appeared in 4.2BSD.
Defined for non VxWorks.
-DSQLITE_MMAP_READWRITE=1 \
Compile time option, if enabled the mmap()+memcpy() used instead of
read()/pread() write()/pwrite().
After this enabled, application must enable it:
PRAGMA mmap_size=268435456;
https://www.sqlite.org/mmap.html
https://bugs.chromium.org/p/chromium/issues/detail?id=489784
https://www.phoronix.com/scan.php?page=news_item&px=MTM3NjQ
-DSQLITE_OS_UNIX=1
** After the following block of preprocess macros, all of SQLITE_OS_UNIX,
** SQLITE_OS_WIN, and SQLITE_OS_OTHER will defined to either 1 or 0. One of
** the three will be 1. The other two will be 0.
We are not WIN and not OTHER anyway.
I use this on desktops without any issues last half year.
Minimum req: FreeBSD 11.1.
Looks like mmap() work without issues on FreeBSD, and app must call "PRAGMA
mmap_size=268435456" before use this feature, so SQLITE_MMAP_READWRITE looks
safe to use.
I use it in codelite IDE and this works.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list