source:
trunk/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch@
728
| Last change on this file since 728 was 561, checked in by , 16 years ago | |
|---|---|
|
|
| File size: 1.9 KB | |
-
sqlite3.c
old new SQLITE_PRIVATE void sqlite3Coverage(int); 383 383 ** 384 384 ** See also ticket #2741. 385 385 */ 386 #if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE 386 #if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE 387 387 # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ 388 388 #endif 389 389 … … SQLITE_PRIVATE void sqlite3Coverage(int); 440 440 */ 441 441 #ifndef _SQLITE3_H_ 442 442 #define _SQLITE3_H_ 443 444 445 446 447 448 449 443 450 #include <stdarg.h> /* Needed for the definition of va_list */ 444 451 445 452 /* … … SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){ 18792 18799 #include <sys/stat.h> 18793 18800 #include <fcntl.h> 18794 18801 #include <unistd.h> 18795 #include <sys/time.h> 18802 #ifdef VXWORKS 18803 # include <sys/times.h> 18804 #else 18805 # include <sys/time.h> 18806 #endif 18796 18807 #include <errno.h> 18797 18808 #ifdef SQLITE_ENABLE_LOCKING_STYLE 18798 18809 #include <sys/ioctl.h> … … static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ 19728 19739 if( newOffset!=offset ){ 19729 19740 return -1; 19730 19741 } 19742 19731 19743 got = write(id->h, pBuf, cnt); 19744 19745 19746 19732 19747 #endif 19733 19748 TIMER_END; 19734 19749 OSTRACE5("WRITE %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED); … … static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ 21554 21569 #if !defined(SQLITE_TEST) 21555 21570 { 21556 21571 int pid, fd; 21557 fd = open("/dev/urandom", O_RDONLY );21572 fd = open("/dev/urandom", O_RDONLY); 21558 21573 if( fd<0 ){ 21559 21574 time_t t; 21560 21575 time(&t); 21561 21576 memcpy(zBuf, &t, sizeof(t)); 21577 21562 21578 pid = getpid(); 21579 21580 21581 21563 21582 memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid)); 21564 21583 }else{ 21565 21584 read(fd, zBuf, nBuf);
Note:
See TracBrowser
for help on using the repository browser.
