Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 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) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
177cd92910d01c97eb3133a59fad417e |
User & Date: | drh 2007-03-22 15:22:06.000 |
Context
2007-03-23
| ||
10:08 | Add a comment to the OsSectorSize() function. (CVS 3710) (check-in: 0fd9983a98 user: danielk1977 tags: trunk) | |
2007-03-22
| ||
15:22 | 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) (check-in: 177cd92910 user: drh tags: trunk) | |
15:20 | Call sqlite3_free() instead of free() to release a buffer allocated by sqlite3_vmprintf() in test_async.c (test suite bug only). (CVS 3708) (check-in: b078f09bff user: danielk1977 tags: trunk) | |
Changes
Changes to src/os_unix.c.
︙ | ︙ | |||
998 999 1000 1001 1002 1003 1004 | ** Seek to the offset in id->offset then read cnt bytes into pBuf. ** Return the number of bytes actually read. Update the offset. */ static int seekAndRead(unixFile *id, void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; | | > > | 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | ** Seek to the offset in id->offset then read cnt bytes into pBuf. ** Return the number of bytes actually read. Update the offset. */ static int seekAndRead(unixFile *id, void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; #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 ){ return -1; } got = read(id->h, pBuf, cnt); #endif |
︙ | ︙ | |||
1043 1044 1045 1046 1047 1048 1049 | ** Seek to the offset in id->offset then read cnt bytes into pBuf. ** Return the number of bytes actually read. Update the offset. */ static int seekAndWrite(unixFile *id, const void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; | | > > | 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | ** Seek to the offset in id->offset then read cnt bytes into pBuf. ** Return the number of bytes actually read. Update the offset. */ static int seekAndWrite(unixFile *id, const void *pBuf, int cnt){ int got; i64 newOffset; TIMER_START; #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 ){ return -1; } got = write(id->h, pBuf, cnt); #endif |
︙ | ︙ |