SQLite

Check-in [1577484595]
Login

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

Overview
Comment:Give the osLocaltime() function file scope in date.c.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1577484595b5e5aab93722d76b273c911a04dc2c
User & Date: drh 2011-06-21 15:54:24.112
Context
2011-06-21
18:12
Updates to nmake makefile to allow options to be passed to lib.exe. (check-in: 9eac4a6bbe user: shaneh tags: trunk)
15:54
Give the osLocaltime() function file scope in date.c. (check-in: 1577484595 user: drh tags: trunk)
15:38
Initialize a variable introduced as part of the fix for [bd484a090c8077] in order to silence a compiler warning. (check-in: 6b9877fa43 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/date.c.
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
** using whatever operating-system specific localtime facility that
** is available.  This routine returns 0 on success and
** non-zero on any kind of error.
**
** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
** routine will always fail.
*/
int osLocaltime(time_t *t, struct tm *pTm){
  int rc;
#if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
      && (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
  struct tm *pX;
  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
  sqlite3_mutex_enter(mutex);
  pX = localtime(t);







|







418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
** using whatever operating-system specific localtime facility that
** is available.  This routine returns 0 on success and
** non-zero on any kind of error.
**
** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
** routine will always fail.
*/
static int osLocaltime(time_t *t, struct tm *pTm){
  int rc;
#if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
      && (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
  struct tm *pX;
  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
  sqlite3_mutex_enter(mutex);
  pX = localtime(t);