summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-09 20:40:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-09 20:40:57 +0000
commit8fdd794d977357a7afb176135cfb2bccccfc4c68 (patch)
treedc77088fc52dffe8ce6885f1753936b3df4d9394 /src
parent228c1e74a70cf6f8e07ab2d5b748cb5a5f65baee (diff)
Portability fix from Ryan Kirkpatrick's Alpha patches. I believe this
is the only diff not accounted for by fmgr rewrite...
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/nabstime.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index f5d238bda73..e6ad6fc3e29 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -1,4 +1,4 @@
-/*
+/*-------------------------------------------------------------------------
* nabstime.c
* Utilities for the built-in type "AbsoluteTime".
* Functions for the built-in type "RelativeTime".
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.76 2000/12/03 20:45:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.77 2000/12/09 20:40:57 tgl Exp $
*
* NOTES
*
@@ -33,12 +33,6 @@
#include "utils/builtins.h"
-#if 0
-static AbsoluteTime tm2abstime(struct tm * tm, int tz);
-
-#endif
-
-
#define MIN_DAYNUM -24856 /* December 13, 1901 */
#define MAX_DAYNUM 24854 /* January 18, 2038 */
@@ -103,6 +97,7 @@ static int sec_tab[] = {
* Function prototypes -- internal to this file only
*/
+static AbsoluteTime tm2abstime(struct tm * tm, int tz);
static void reltime2tm(RelativeTime time, struct tm * tm);
#ifdef NOT_USED
@@ -115,6 +110,7 @@ static int istinterval(char *i_string,
AbsoluteTime *i_start,
AbsoluteTime *i_end);
+
/* GetCurrentAbsoluteTime()
* Get the current system time. Set timezone parameters if not specified elsewhere.
* Define HasTZSet to allow clients to specify the default timezone.
@@ -291,8 +287,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
static AbsoluteTime
tm2abstime(struct tm * tm, int tz)
{
- int day,
- sec;
+ int day;
+ AbsoluteTime sec;
/* validate, before going out of range on some members */
if (tm->tm_year < 1901 || tm->tm_year > 2038