/ Check-in [73906b67]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updates to the OS/2 patches. This change also move the location of a global variable declaration in shell.c which might effect other build targets.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 73906b67dc920e0c36e68ef9a302be3b495e8e3a
User & Date: drh 2011-04-11 15:36:26
Context
2011-04-11
18:35
Do not override the fchmod system call in unix unless the SQLITE_ENABLE_LOCKING_STYLE compile-time option is engaged. check-in: 51029d84 user: drh tags: trunk
15:36
Updates to the OS/2 patches. This change also move the location of a global variable declaration in shell.c which might effect other build targets. check-in: 73906b67 user: drh tags: trunk
15:35
Fix a signed integer overflow problem in the testcase() macro. check-in: f18f5f58 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mutex_os2.c.

   247    247     assert( os2MutexHeld(p) );
   248    248     DosReleaseMutexSem(p->mutex);
   249    249   #ifdef SQLITE_DEBUG
   250    250     if( p->trace ) os2MutexTrace(p, "leave");
   251    251   #endif
   252    252   }
   253    253   
   254         -SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
          254  +sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
   255    255     static const sqlite3_mutex_methods sMutex = {
   256    256       os2MutexInit,
   257    257       os2MutexEnd,
   258    258       os2MutexAlloc,
   259    259       os2MutexFree,
   260    260       os2MutexEnter,
   261    261       os2MutexTry,

Changes to src/os_os2.c.

  1833   1833   }
  1834   1834   
  1835   1835   /*
  1836   1836   ** Find the current time (in Universal Coordinated Time).  Write the
  1837   1837   ** current time and date as a Julian Day number into *prNow and
  1838   1838   ** return 0.  Return 1 if the time and date cannot be found.
  1839   1839   */
  1840         -int os2CurrentTime( sqlite3_vfs *pVfs, double *prNow ){
         1840  +static int os2CurrentTime( sqlite3_vfs *pVfs, double *prNow ){
  1841   1841     int rc;
  1842   1842     sqlite3_int64 i;
  1843   1843     rc = os2CurrentTimeInt64(pVfs, &i);
  1844   1844     if( !rc ){
  1845   1845       *prNow = i/86400000.0;
  1846   1846     }
  1847   1847     return rc;

Changes to src/shell.c.

    66     66   #if defined(_WIN32_WCE)
    67     67   /* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty()
    68     68    * thus we always assume that we have a console. That can be
    69     69    * overridden with the -batch command line option.
    70     70    */
    71     71   #define isatty(x) 1
    72     72   #endif
           73  +
           74  +/* True if the timer is enabled */
           75  +static int enableTimer = 0;
    73     76   
    74     77   #if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) && !defined(__RTP__) && !defined(_WRS_KERNEL)
    75     78   #include <sys/time.h>
    76     79   #include <sys/resource.h>
    77     80   
    78     81   /* Saved resource information for the beginning of an operation */
    79     82   static struct rusage sBegin;
    80     83   
    81         -/* True if the timer is enabled */
    82         -static int enableTimer = 0;
    83         -
    84     84   /*
    85     85   ** Begin timing an operation
    86     86   */
    87     87   static void beginTimer(void){
    88     88     if( enableTimer ){
    89     89       getrusage(RUSAGE_SELF, &sBegin);
    90     90     }
................................................................................
   120    120   /* Saved resource information for the beginning of an operation */
   121    121   static HANDLE hProcess;
   122    122   static FILETIME ftKernelBegin;
   123    123   static FILETIME ftUserBegin;
   124    124   typedef BOOL (WINAPI *GETPROCTIMES)(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME, LPFILETIME);
   125    125   static GETPROCTIMES getProcessTimesAddr = NULL;
   126    126   
   127         -/* True if the timer is enabled */
   128         -static int enableTimer = 0;
   129         -
   130    127   /*
   131    128   ** Check to see if we have timer support.  Return 1 if necessary
   132    129   ** support found (or found previously).
   133    130   */
   134    131   static int hasTimer(void){
   135    132     if( getProcessTimesAddr ){
   136    133       return 1;