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

Automatically set HAVE_PREAD and HAVE_PWRITE on linux, as has been done in

MacOS for a long time now.

FossilOrigin-Name: 2f7a36d2c374100019bd9d38aea51ea10cfcf9b1f0330ba084a75f0773df8ebf
This commit is contained in:
drh
2023-04-12 19:40:00 +00:00
parent 6b507423a0
commit be0023faba
3 changed files with 8 additions and 14 deletions

View File

@@ -72,7 +72,7 @@
#endif
/* Use pread() and pwrite() if they are available */
#if defined(__APPLE__)
#if defined(__APPLE__) || defined(__linux__)
# define HAVE_PREAD 1
# define HAVE_PWRITE 1
#endif
@@ -3322,12 +3322,6 @@ static int nfsUnlock(sqlite3_file *id, int eFileLock){
** Seek to the offset passed as the second argument, then read cnt
** bytes into pBuf. Return the number of bytes actually read.
**
** NB: If you define USE_PREAD or USE_PREAD64, then it might also
** be necessary to define _XOPEN_SOURCE to be 500. This varies from
** one system to another. Since SQLite does not define USE_PREAD
** in any form by default, we will not attempt to define _XOPEN_SOURCE.
** See tickets #2741 and #2681.
**
** To avoid stomping the errno value on a failed read the lastErrno value
** is set before returning.
*/