Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2020 07:05:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 241385] databases/sqlite3: enable OS features
Message-ID:  <bug-241385-7788-7bXgGZWknU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241385-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-241385-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241385

--- Comment #10 from rozhuk.im@gmail.com ---
Already in Makefile:
-DHAVE_ISNAN=3D1 \
-DHAVE_MALLOC_USABLE_SIZE=3D1 \
-DHAVE_GMTIME_R=3D1 \
-DHAVE_LOCALTIME_R=3D1 \
-DHAVE_USLEEP=3D1 \
-DHAVE_STRCHRNUL=3D1 \



New to add:

-DHAVE_DECL_STRERROR_R=3D1 \
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=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dfchown&apropos=3D0&sektion=3D0&=
manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The fchown() system call appeared in 4.2BSD.
Defined for non VxWorks.


-DHAVE_FDATASYNC=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dfdatasync&apropos=3D0&sektion=
=3D0&manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The fdatasync() system call appeared in FreeBSD 11.1.


-DHAVE_GETHOSTUUID=3D1 \
gethostuuid() - apple specific, removed from this patch.


-DHAVE_LOCALTIME_S=3D1 \
localtime_s() - not used if HAVE_LOCALTIME_R
looks like windows specific, removed from this patch.


-DHAVE_LSTAT=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dlstat&apropos=3D0&sektion=3D0&m=
anpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The lstat() system call appeared in 4.2BSD.
Defined for non VxWorks.


-DHAVE_POSIX_FALLOCATE=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dposix_fallocate&apropos=3D0&sek=
tion=3D0&manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dh=
tml
The posix_fallocate() function appeared in FreeBSD 9.0.


-DHAVE_PREAD=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dpread&apropos=3D0&sektion=3D0&m=
anpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The pread() function appeared in AT&T System V Release 4 UNIX.


-DHAVE_PWRITE=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dpwrite&apropos=3D0&sektion=3D0&=
manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The pwrite() function appeared in AT&T System V Release 4 UNIX.


-DHAVE_STRERROR_R=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dstrerror_r&apropos=3D0&sektion=
=3D0&manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
strerror_r() function was implemented in FreeBSD 4.4


-DHAVE_READLINK=3D1 \
https://www.freebsd.org/cgi/man.cgi?query=3Dreadlink&apropos=3D0&sektion=3D=
2&manpath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
The readlink() system call appeared in 4.2BSD.
Defined for non VxWorks.


-DSQLITE_MMAP_READWRITE=3D1 \
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=3D268435456;

https://www.sqlite.org/mmap.html
https://bugs.chromium.org/p/chromium/issues/detail?id=3D489784
https://www.phoronix.com/scan.php?page=3Dnews_item&px=3DMTM3NjQ


-DSQLITE_OS_UNIX=3D1
** 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=3D268435456" before use this feature, so SQLITE_MMAP_READWRITE lo=
oks
safe to use.
I use it in codelite IDE and this works.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241385-7788-7bXgGZWknU>