/ Check-in [612b6d1b]
Login

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

Overview
Comment:Fix a problem with SQLITE_OMIT_WAL builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 612b6d1b1f74eaf618520b90811eca10f978fc71
User & Date: dan 2014-06-23 10:04:58
Context
2014-06-23
10:18
Fix a problem with SQLITE_OMIT_WSD builds. check-in: 07dda49c user: dan tags: trunk
10:04
Fix a problem with SQLITE_OMIT_WAL builds. check-in: 612b6d1b user: dan tags: trunk
2014-06-20
13:55
Improved display of record data in the "NNNbd" output of the showdb.exe utility program. check-in: f735c249 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

   441    441   
   442    442   #if HAVE_MREMAP
   443    443     { "mremap",       (sqlite3_syscall_ptr)mremap,          0 },
   444    444   #else
   445    445     { "mremap",       (sqlite3_syscall_ptr)0,               0 },
   446    446   #endif
   447    447   #define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[23].pCurrent)
   448         -#endif
   449         -
   450    448     { "getpagesize",  (sqlite3_syscall_ptr)unixGetpagesize, 0 },
   451    449   #define osGetpagesize ((int(*)(void))aSyscall[24].pCurrent)
          450  +
          451  +#endif
   452    452   
   453    453   }; /* End of the overrideable system calls */
   454    454   
   455    455   /*
   456    456   ** This is the xSetSystemCall() method of sqlite3_vfs for all of the
   457    457   ** "unix" VFSes.  Return SQLITE_OK opon successfully updating the
   458    458   ** system call pointer, or SQLITE_NOTFOUND if there is no configurable
................................................................................
  3960   3960   #endif
  3961   3961     if( p->ctrlFlags & UNIXFILE_PSOW ){
  3962   3962       rc |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
  3963   3963     }
  3964   3964     return rc;
  3965   3965   }
  3966   3966   
         3967  +#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
         3968  +
         3969  +/*
         3970  +** Return the system page size.
         3971  +**
         3972  +** This function should not be called directly by other code in this file. 
         3973  +** Instead, it should be called via macro osGetpagesize().
         3974  +*/
         3975  +static int unixGetpagesize(void){
         3976  +#if defined(_BSD_SOURCE)
         3977  +  return getpagesize();
         3978  +#else
         3979  +  return (int)sysconf(_SC_PAGESIZE);
         3980  +#endif
         3981  +}
         3982  +
         3983  +#endif /* !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 */
         3984  +
  3967   3985   #ifndef SQLITE_OMIT_WAL
  3968         -
  3969   3986   
  3970   3987   /*
  3971   3988   ** Object used to represent an shared memory buffer.  
  3972   3989   **
  3973   3990   ** When multiple threads all reference the same wal-index, each thread
  3974   3991   ** has its own unixShm object, but they all point to a single instance
  3975   3992   ** of this unixShmNode object.  In other words, each wal-index is opened
................................................................................
  4112   4129              pShmNode->sharedMask, pShmNode->exclMask));
  4113   4130     }
  4114   4131   #endif
  4115   4132   
  4116   4133     return rc;        
  4117   4134   }
  4118   4135   
  4119         -/*
  4120         -** Return the system page size.
  4121         -**
  4122         -** This function should not be called directly by other code in this file. 
  4123         -** Instead, it should be called via macro osGetpagesize().
  4124         -*/
  4125         -static int unixGetpagesize(void){
  4126         -#if defined(_BSD_SOURCE)
  4127         -  return getpagesize();
  4128         -#else
  4129         -  return (int)sysconf(_SC_PAGESIZE);
  4130         -#endif
  4131         -}
  4132         -
  4133   4136   /*
  4134   4137   ** Return the minimum number of 32KB shm regions that should be mapped at
  4135   4138   ** a time, assuming that each mapping must be an integer multiple of the
  4136   4139   ** current system page-size.
  4137   4140   **
  4138   4141   ** Usually, this is 1. The exception seems to be systems that are configured
  4139   4142   ** to use 64KB pages - in this case each mapping must cover at least two