diff options
author | drh <drh@noemail.net> | 2007-03-22 15:22:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-03-22 15:22:06 +0000 |
commit | 8350a2187aa29a5df7c12ecc9cf8f43aa36129ce (patch) | |
tree | 02958c8ba8d411d0f454ebfe319e4f36db87012f /src/os_unix.c | |
parent | 73375822d43f41f2f34be9eaca8b6992b4f4ad5d (diff) | |
download | sqlite-8350a2187aa29a5df7c12ecc9cf8f43aa36129ce.tar.gz sqlite-8350a2187aa29a5df7c12ecc9cf8f43aa36129ce.zip |
In os_unix.c, make a distinction between pread() and pread64(). Add a new
compile-time macro USE_PREAD64 to select the latter. (CVS 3709)
FossilOrigin-Name: 177cd92910d01c97eb3133a59fad417edbb1aa92
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 42d988403..dfbb9338c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1002,8 +1002,10 @@ static int seekAndRead(unixFile *id, void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; -#ifdef USE_PREAD +#if defined(USE_PREAD) got = pread(id->h, pBuf, cnt, id->offset); +#elif defined(USE_PREAD64) + got = pread64(id->h, pBuf, cnt, id->offset); #else newOffset = lseek(id->h, id->offset, SEEK_SET); if( newOffset!=id->offset ){ @@ -1047,8 +1049,10 @@ static int seekAndWrite(unixFile *id, const void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; -#ifdef USE_PREAD +#if defined(USE_PREAD) got = pwrite(id->h, pBuf, cnt, id->offset); +#elif defined(USE_PREAD64) + got = pwrite64(id->h, pBuf, cnt, id->offset); #else newOffset = lseek(id->h, id->offset, SEEK_SET); if( newOffset!=id->offset ){ |