Skip to content

Commit 93c7e50

Browse files
committed
Correct compile failures in REL6_4 datetime code.
1 parent 3533684 commit 93c7e50

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

src/backend/utils/adt/datetime.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.25.2.2 1999/02/13 05:59:34 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.25.2.3 1999/03/06 22:49:03 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -27,14 +27,6 @@
2727

2828
static int date2tm(DateADT dateVal, int *tzp, struct tm * tm, double *fsec, char **tzn);
2929

30-
#if 0
31-
static int day_tab[2][12] = {
32-
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
33-
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
34-
35-
#define isleap(y) (((y % 4) == 0 && (y % 100) != 0) || (y % 400) == 0)
36-
#endif
37-
3830
#define UTIME_MINYEAR (1901)
3931
#define UTIME_MINMONTH (12)
4032
#define UTIME_MINDAY (14)

src/backend/utils/adt/dt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.59.2.2 1999/02/13 05:59:34 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.59.2.3 1999/03/06 22:49:01 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -56,8 +56,6 @@ static int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
5656
#define ROUND_ALL 0
5757

5858
#if 0
59-
#define isleap(y) (((y % 4) == 0) && (((y % 100) != 0) || ((y % 400) == 0)))
60-
6159
int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
6260
#endif
6361

@@ -2302,8 +2300,7 @@ datetkn *deltacache[MAXDATEFIELDS] = {NULL};
23022300
* These routines will be used by other date/time packages - tgl 97/02/25
23032301
*/
23042302

2305-
#if 0
2306-
XXX moved to dt.h - thomas 1999-01-15
2303+
#if 1
23072304
/* Set the minimum year to one greater than the year of the first valid day
23082305
* to avoid having to check year and day both. - tgl 97/05/08
23092306
*/

src/include/utils/dt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: dt.h,v 1.33.2.1 1999/03/03 05:11:39 thomas Exp $
11+
* $Id: dt.h,v 1.33.2.2 1999/03/06 22:49:01 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -269,7 +269,7 @@ extern int datetime_is_epoch(double j);
269269

270270
extern int day_tab[2][13];
271271

272-
#define isleap(y) (((y % 4) == 0 && (y % 100) != 0) || (y % 400) == 0)
272+
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
273273

274274
/* Julian date support for date2j() and j2date()
275275
* Set the minimum year to one greater than the year of the first valid day

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy