aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-03-04 13:08:35 +0000
committerdrh <drh@noemail.net>2016-03-04 13:08:35 +0000
commit14520bfd237ad4e92a2dfc84f6b2741a37d5a562 (patch)
treea1c7ab2f48a228594fa9bd287cdd20aa5790438b /src/os_unix.c
parentff6b82663181c0ebdd4b57a0e858466c3658c78d (diff)
parent94580868f5b9eea4b52710b7304a423006a44f98 (diff)
downloadsqlite-14520bfd237ad4e92a2dfc84f6b2741a37d5a562.tar.gz
sqlite-14520bfd237ad4e92a2dfc84f6b2741a37d5a562.zip
Merge changes from trunk.
FossilOrigin-Name: a87305dfd49ee17632d0bce66ce7c2e9407b7b3e
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ea07bd99f..d6fbd8058 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -71,6 +71,19 @@
# endif
#endif
+/* Use pread() and pwrite() if they are available */
+#if defined(__APPLE__)
+# define HAVE_PREAD 1
+# define HAVE_PWRITE 1
+#endif
+#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)
+# undef USE_PREAD
+# define USE_PREAD64 1
+#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)
+# undef USE_PREAD64
+# define USE_PREAD 1
+#endif
+
/*
** standard include files.
*/