/ Check-in [0fb98c35]
Login

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

Overview
Comment:Fix some function declarations (change "int foo()" to "int foo(void)"). Ticket #3399. (CVS 5740)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0fb98c35353d8c0a8d669bbe45fe84e3a5060621
User & Date: danielk1977 2008-09-24 09:12:47
Context
2008-09-24
09:58
Add file fts3_icu.c to the amalgamation. Because of the way header files are included into sqlite3.c, fts3_icu.c has to appear after all the other fts3 and icu extension files. Ticket #3398. (CVS 5741) check-in: 0acca584 user: danielk1977 tags: trunk
09:12
Fix some function declarations (change "int foo()" to "int foo(void)"). Ticket #3399. (CVS 5740) check-in: 0fb98c35 user: danielk1977 tags: trunk
2008-09-23
17:39
Catch another case where SQLITE_IOERR could be returned instead of SQLITE_NOMEM following an out-of-memory error. (CVS 5739) check-in: 18d030da user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to Unix systems.
    14     14   **
    15         -** $Id: os_unix.c,v 1.203 2008/09/23 10:23:26 drh Exp $
           15  +** $Id: os_unix.c,v 1.204 2008/09/24 09:12:47 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #if SQLITE_OS_UNIX              /* This file is used on unix only */
    19     19   
    20     20   /*
    21     21   ** If SQLITE_ENABLE_LOCKING_STYLE is defined and is non-zero, then several
    22     22   ** alternative locking implementations are provided:
................................................................................
   385    385   ** a normal expected return code of SQLITE_BUSY or SQLITE_OK
   386    386   */
   387    387   #define IS_LOCK_ERROR(x)  ((x != SQLITE_OK) && (x != SQLITE_BUSY))
   388    388   
   389    389   /*
   390    390   ** Helper functions to obtain and relinquish the global mutex.
   391    391   */
   392         -static void enterMutex(){
          392  +static void enterMutex(void){
   393    393     sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
   394    394   }
   395         -static void leaveMutex(){
          395  +static void leaveMutex(void){
   396    396     sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
   397    397   }
   398    398   
   399    399   #if SQLITE_THREADSAFE
   400    400   /*
   401    401   ** This variable records whether or not threads can override each others
   402    402   ** locks.

Changes to src/pcache.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file implements that page cache.
    13     13   **
    14         -** @(#) $Id: pcache.c,v 1.31 2008/09/21 15:14:04 drh Exp $
           14  +** @(#) $Id: pcache.c,v 1.32 2008/09/24 09:12:47 danielk1977 Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   
    18     18   /*
    19     19   ** A complete page cache is an instance of this structure.
    20     20   **
    21     21   ** A cache may only be deleted by its owner and while holding the
................................................................................
   519    519   ** This function removes page pcache.pLruTail from the global LRU list,
   520    520   ** and from the hash-table and PCache.pClean list of the owner pcache.
   521    521   ** There should be no other references to the page.
   522    522   **
   523    523   ** A pointer to the recycled page is returned, or NULL if no page is
   524    524   ** eligible for recycling.
   525    525   */
   526         -static PgHdr *pcacheRecyclePage(){
          526  +static PgHdr *pcacheRecyclePage(void){
   527    527     PgHdr *p = 0;
   528    528     assert( sqlite3_mutex_held(pcache_g.mutex) );
   529    529   
   530    530     if( (p=pcache_g.pLruTail) ){
   531    531       assert( (p->flags&PGHDR_DIRTY)==0 );
   532    532       pcacheRemoveFromLruList(p);
   533    533       pcacheRemoveFromHash(p);
................................................................................
   947    947     pcacheExitMutex();
   948    948   }
   949    949   
   950    950   /*
   951    951   ** If there are currently more than pcache.nMaxPage pages allocated, try
   952    952   ** to recycle pages to reduce the number allocated to pcache.nMaxPage.
   953    953   */
   954         -static void pcacheEnforceMaxPage(){
          954  +static void pcacheEnforceMaxPage(void){
   955    955     PgHdr *p;
   956    956     assert( sqlite3_mutex_held(pcache_g.mutex) );
   957    957     while( pcache_g.nCurrentPage>pcache_g.nMaxPage && (p = pcacheRecyclePage()) ){
   958    958       pcachePageFree(p);
   959    959     }
   960    960   }
   961    961   

Changes to test/lock5.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is database locks.
    13     13   #
    14         -# $Id: lock5.test,v 1.2 2008/07/12 14:52:20 drh Exp $
           14  +# $Id: lock5.test,v 1.3 2008/09/24 09:12:47 danielk1977 Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # This file is only run if using the unix backend compiled with the
    20     20   # SQLITE_ENABLE_LOCKING_STYLE macro.
    21     21   db close
    22     22   if {[catch {sqlite3 db test.db -vfs unix-none} msg]} {
    23         -puts $msg
    24     23     finish_test
    25     24     return
    26     25   }
    27     26   db close
    28     27   
    29     28   do_test lock5-dotfile.1 {
    30     29     sqlite3 db test.db -vfs unix-dotfile