Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b1f10c84
Commit
b1f10c84
authored
Jul 10, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure macros are adequately parenthesized.
parent
fa9a95d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
src/include/utils/datetime.h
src/include/utils/datetime.h
+11
-10
No files found.
src/include/utils/datetime.h
View file @
b1f10c84
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: datetime.h,v 1.
19 2001/06/18 16:14:43 momjian
Exp $
* $Id: datetime.h,v 1.
20 2001/07/10 01:39:20 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <time.h>
#include <time.h>
#include <math.h>
#include <math.h>
#include <limits.h>
#include <limits.h>
#include "utils/timestamp.h"
#include "utils/timestamp.h"
...
@@ -218,9 +219,9 @@ extern int day_tab[2][13];
...
@@ -218,9 +219,9 @@ extern int day_tab[2][13];
#define JULIAN_MINMONTH (11)
#define JULIAN_MINMONTH (11)
#define JULIAN_MINDAY (23)
#define JULIAN_MINDAY (23)
#define IS_VALID_JULIAN(y,m,d) ((
y
> JULIAN_MINYEAR) \
#define IS_VALID_JULIAN(y,m,d) ((
(y)
> JULIAN_MINYEAR) \
|| ((
y == JULIAN_MINYEAR) && ((m
> JULIAN_MINMONTH) \
|| ((
(y) == JULIAN_MINYEAR) && (((m)
> JULIAN_MINMONTH) \
|| ((
m == JULIAN_MINMONTH) && (d
>= JULIAN_MINDAY)))))
|| ((
(m) == JULIAN_MINMONTH) && ((d)
>= JULIAN_MINDAY)))))
#define UTIME_MINYEAR (1901)
#define UTIME_MINYEAR (1901)
#define UTIME_MINMONTH (12)
#define UTIME_MINMONTH (12)
...
@@ -229,12 +230,12 @@ extern int day_tab[2][13];
...
@@ -229,12 +230,12 @@ extern int day_tab[2][13];
#define UTIME_MAXMONTH (01)
#define UTIME_MAXMONTH (01)
#define UTIME_MAXDAY (18)
#define UTIME_MAXDAY (18)
#define IS_VALID_UTIME(y,m,d) (((
y
> UTIME_MINYEAR) \
#define IS_VALID_UTIME(y,m,d) (((
(y)
> UTIME_MINYEAR) \
|| ((
y == UTIME_MINYEAR) && ((m
> UTIME_MINMONTH) \
|| ((
(y) == UTIME_MINYEAR) && (((m)
> UTIME_MINMONTH) \
|| ((
m == UTIME_MINMONTH) && (d
>= UTIME_MINDAY))))) \
|| ((
(m) == UTIME_MINMONTH) && ((d)
>= UTIME_MINDAY))))) \
&& ((
y
< UTIME_MAXYEAR) \
&& ((
(y)
< UTIME_MAXYEAR) \
|| ((
y == UTIME_MAXYEAR) && ((m
< UTIME_MAXMONTH) \
|| ((
(y) == UTIME_MAXYEAR) && (((m)
< UTIME_MAXMONTH) \
|| ((
m == UTIME_MAXMONTH) && (d
<= UTIME_MAXDAY))))))
|| ((
(m) == UTIME_MAXMONTH) && ((d)
<= UTIME_MAXDAY))))))
extern
void
GetCurrentTime
(
struct
tm
*
tm
);
extern
void
GetCurrentTime
(
struct
tm
*
tm
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment