source: trunk/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch@ 841

Last change on this file since 841 was 561, checked in by Dmitry A. Kuminov, 16 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:eol-style set to native
File size: 1.9 KB
  • sqlite3.c

    old new SQLITE_PRIVATE void sqlite3Coverage(int);  
    383383**
    384384** See also ticket #2741.
    385385*/
    386 #if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
     386#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
    387387#  define _XOPEN_SOURCE 500  /* Needed to enable pthread recursive mutexes */
    388388#endif
    389389
    SQLITE_PRIVATE void sqlite3Coverage(int);  
    440440*/
    441441#ifndef _SQLITE3_H_
    442442#define _SQLITE3_H_
     443
     444
     445
     446
     447
     448
     449
    443450#include <stdarg.h>     /* Needed for the definition of va_list */
    444451
    445452/*
    SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){  
    1879218799#include <sys/stat.h>
    1879318800#include <fcntl.h>
    1879418801#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
    1879618807#include <errno.h>
    1879718808#ifdef SQLITE_ENABLE_LOCKING_STYLE
    1879818809#include <sys/ioctl.h>
    static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){  
    1972819739  if( newOffset!=offset ){
    1972919740    return -1;
    1973019741  }
     19742
    1973119743  got = write(id->h, pBuf, cnt);
     19744
     19745
     19746
    1973219747#endif
    1973319748  TIMER_END;
    1973419749  OSTRACE5("WRITE   %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED);
    static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){  
    2155421569#if !defined(SQLITE_TEST)
    2155521570  {
    2155621571    int pid, fd;
    21557     fd = open("/dev/urandom", O_RDONLY);
     21572    fd = open("/dev/urandom", O_RDONLY);
    2155821573    if( fd<0 ){
    2155921574      time_t t;
    2156021575      time(&t);
    2156121576      memcpy(zBuf, &t, sizeof(t));
     21577
    2156221578      pid = getpid();
     21579
     21580
     21581
    2156321582      memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
    2156421583    }else{
    2156521584      read(fd, zBuf, nBuf);
Note: See TracBrowser for help on using the repository browser.