SQLite

Check-in [9392c51450]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9392c514501be333a3c22b552dc036e083eb22b4
User & Date: dougcurrie 2003-12-24 01:41:19.000
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: cfe0acf9ec user: drh tags: trunk)
2003-12-24
01:41
minor edits for new date.c with mingw/msys on Windows (CVS 1148) (check-in: 9392c51450 user: dougcurrie tags: trunk)
2003-12-23
16:34
Update date/time functions so that they correctly handle NULL arguments. (CVS 1147) (check-in: a5a5fbd601 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/date.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.4 2003/12/23 16:34:13 drh Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.5 2003/12/24 01:41:19 dougcurrie Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.
44
45
46
47
48
49
50


51
52
53
54
55
56
57
58
59
60
61
62
63
**      Jean Meeus
**      Astronomical Algorithms, 2nd Edition, 1998
**      ISBM 0-943396-61-1
**      Willmann-Bell, Inc
**      Richmond, Virginia (USA)
*/
#ifndef SQLITE_OMIT_DATETIME_FUNCS


#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include "sqliteInt.h"
#include "os.h"

/*
** A structure for holding a single date and time.
*/
typedef struct DateTime DateTime;
struct DateTime {
  double rJD;      /* The julian day number */







>
>




<
<







44
45
46
47
48
49
50
51
52
53
54
55
56


57
58
59
60
61
62
63
**      Jean Meeus
**      Astronomical Algorithms, 2nd Edition, 1998
**      ISBM 0-943396-61-1
**      Willmann-Bell, Inc
**      Richmond, Virginia (USA)
*/
#ifndef SQLITE_OMIT_DATETIME_FUNCS
#include "os.h"
#include "sqliteInt.h"
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>



/*
** A structure for holding a single date and time.
*/
typedef struct DateTime DateTime;
struct DateTime {
  double rJD;      /* The julian day number */
Changes to src/os.h.
128
129
130
131
132
133
134



135
136
137
138
139
140
141
    int locked;             /* 0: unlocked, <0: write lock, >0: read lock */
  };
# if defined(_MSC_VER) || defined(__BORLANDC__)
    typedef __int64 off_t;
# else
#  if !defined(_CYGWIN_TYPES_H)
     typedef long long off_t;



#  endif
# endif
# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
# define SQLITE_MIN_SLEEP_MS 1
#endif

#if OS_MAC







>
>
>







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

#if OS_MAC