/ Check-in [9392c514]
Login

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

Overview
Comment:minor edits for new date.c with mingw/msys on Windows (CVS 1148)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9392c514501be333a3c22b552dc036e083eb22b4
User & Date: dougcurrie 2003-12-24 01:41:19
Context
2003-12-31
13:21
Reduce the randomness in the sqliteRandomSeed() routine in order to silence bogus errors from valgrind. Tickets #535 and #536. (CVS 1149) check-in: cfe0acf9 user: drh tags: trunk
2003-12-24
01:41
minor edits for new date.c with mingw/msys on Windows (CVS 1148) check-in: 9392c514 user: dougcurrie tags: trunk
2003-12-23
16:34
Update date/time functions so that they correctly handle NULL arguments. (CVS 1147) check-in: a5a5fbd6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/date.c.

    12     12   ** This file contains the C functions that implement date and time
    13     13   ** functions for SQLite.  
    14     14   **
    15     15   ** There is only one exported symbol in this file - the function
    16     16   ** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
    17     17   ** All other code has file scope.
    18     18   **
    19         -** $Id: date.c,v 1.4 2003/12/23 16:34:13 drh Exp $
           19  +** $Id: date.c,v 1.5 2003/12/24 01:41:19 dougcurrie Exp $
    20     20   **
    21     21   ** NOTES:
    22     22   **
    23     23   ** SQLite processes all times and dates as Julian Day numbers.  The
    24     24   ** dates and times are stored as the number of days since noon
    25     25   ** in Greenwich on November 24, 4714 B.C. according to the Gregorian
    26     26   ** calendar system.
................................................................................
    44     44   **      Jean Meeus
    45     45   **      Astronomical Algorithms, 2nd Edition, 1998
    46     46   **      ISBM 0-943396-61-1
    47     47   **      Willmann-Bell, Inc
    48     48   **      Richmond, Virginia (USA)
    49     49   */
    50     50   #ifndef SQLITE_OMIT_DATETIME_FUNCS
           51  +#include "os.h"
           52  +#include "sqliteInt.h"
    51     53   #include <ctype.h>
    52     54   #include <stdlib.h>
    53     55   #include <assert.h>
    54     56   #include <time.h>
    55         -#include "sqliteInt.h"
    56         -#include "os.h"
    57     57   
    58     58   /*
    59     59   ** A structure for holding a single date and time.
    60     60   */
    61     61   typedef struct DateTime DateTime;
    62     62   struct DateTime {
    63     63     double rJD;      /* The julian day number */

Changes to src/os.h.

   128    128       int locked;             /* 0: unlocked, <0: write lock, >0: read lock */
   129    129     };
   130    130   # if defined(_MSC_VER) || defined(__BORLANDC__)
   131    131       typedef __int64 off_t;
   132    132   # else
   133    133   #  if !defined(_CYGWIN_TYPES_H)
   134    134        typedef long long off_t;
          135  +#    if defined(__MINGW32__)
          136  +#      define	_OFF_T_
          137  +#    endif
   135    138   #  endif
   136    139   # endif
   137    140   # define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
   138    141   # define SQLITE_MIN_SLEEP_MS 1
   139    142   #endif
   140    143   
   141    144   #if OS_MAC