1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Use preprocessor macros to automatically detect whether or not

posix_allocate() is available.  (It is generally available on Linux
but not on Mac.)  Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]

FossilOrigin-Name: 597333f1024092b94bcd8772541e19a0f707bd40
This commit is contained in:
drh
2012-11-13 11:08:49 +00:00
parent 0fbb50ee15
commit 6033e15aa2
3 changed files with 14 additions and 10 deletions

View File

@@ -46,6 +46,13 @@
#include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */
/* Use posix_fallocate() if it is available
*/
#if !defined(HAVE_POSIX_FALLOCATE) \
&& (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L)
# define HAVE_POSIX_FALLOCATE 1
#endif
/*
** There are various methods for file locking used for concurrency
** control: