/ Check-in [f970a3de]
Login

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

Overview
Comment:Fix a few compilation issues that can occur with certain compilers (e.g. GCC 2.95.3, MSVC).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | compiler-compat
Files: files | file ages | folders
SHA1:f970a3de61fe2ebaf1778c4a3383cfdc52299162
User & Date: mistachkin 2012-06-18 08:00:56
Context
2012-06-18
17:15
Allow the SQLITE_API macro to apply to the sqlite3_win32_sleep function. Closed-Leaf check-in: 21266c68 user: mistachkin tags: compiler-compat
08:00
Fix a few compilation issues that can occur with certain compilers (e.g. GCC 2.95.3, MSVC). check-in: f970a3de user: mistachkin tags: compiler-compat
2012-06-16
15:26
In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same. check-in: 0c2fb18d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_unicode2.c.

   142    142           iLo = iTest+1;
   143    143         }else{
   144    144           iHi = iTest-1;
   145    145         }
   146    146       }
   147    147       assert( aEntry[0]<key );
   148    148       assert( key>=aEntry[iRes] );
   149         -    return (c >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));
          149  +    return (((unsigned int)c) >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));
   150    150     }
   151    151     return 1;
   152    152   }
   153    153   
   154    154   
   155    155   /*
   156    156   ** If the argument is a codepoint corresponding to a lowercase letter

Changes to src/mutex_w32.c.

   105    105   /* As winMutexInit() and winMutexEnd() are called as part
   106    106   ** of the sqlite3_initialize and sqlite3_shutdown()
   107    107   ** processing, the "interlocked" magic is probably not
   108    108   ** strictly necessary.
   109    109   */
   110    110   static long winMutex_lock = 0;
   111    111   
   112         -extern void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
   113         -
   114    112   static int winMutexInit(void){ 
   115    113     /* The first to increment to 1 does actual initialization */
   116    114     if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
   117    115       int i;
   118    116       for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
   119    117   #if SQLITE_OS_WINRT
   120    118         InitializeCriticalSectionEx(&winMutex_staticMutexes[i].mutex, 0, 0);
................................................................................
   122    120         InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
   123    121   #endif
   124    122       }
   125    123       winMutex_isInit = 1;
   126    124     }else{
   127    125       /* Someone else is in the process of initing the static mutexes */
   128    126       while( !winMutex_isInit ){
          127  +      extern void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
   129    128         sqlite3_win32_sleep(1);
   130    129       }
   131    130     }
   132    131     return SQLITE_OK; 
   133    132   }
   134    133   
   135    134   static int winMutexEnd(void){ 

Changes to src/shell.c.

  2693   2693   ** 0 return indicates an error of some kind.
  2694   2694   */
  2695   2695   static char *find_home_dir(void){
  2696   2696     static char *home_dir = NULL;
  2697   2697     if( home_dir ) return home_dir;
  2698   2698   
  2699   2699   #if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) && !defined(_WIN32_WCE) && !defined(__RTP__) && !defined(_WRS_KERNEL)
  2700         -  struct passwd *pwent;
  2701         -  uid_t uid = getuid();
  2702         -  if( (pwent=getpwuid(uid)) != NULL) {
  2703         -    home_dir = pwent->pw_dir;
         2700  +  {
         2701  +    struct passwd *pwent;
         2702  +    uid_t uid = getuid();
         2703  +    if( (pwent=getpwuid(uid)) != NULL) {
         2704  +      home_dir = pwent->pw_dir;
         2705  +    }
  2704   2706     }
  2705   2707   #endif
  2706   2708   
  2707   2709   #if defined(_WIN32_WCE)
  2708   2710     /* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
  2709   2711      */
  2710   2712     home_dir = "/";