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

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
This commit is contained in:
drh
2007-03-22 15:22:06 +00:00
parent 73375822d4
commit 8350a2187a
3 changed files with 14 additions and 10 deletions

View File

@@ -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 ){