mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Portability fix from Ryan Kirkpatrick's Alpha patches. I believe this
is the only diff not accounted for by fmgr rewrite...
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*-------------------------------------------------------------------------
|
||||||
* nabstime.c
|
* nabstime.c
|
||||||
* Utilities for the built-in type "AbsoluteTime".
|
* Utilities for the built-in type "AbsoluteTime".
|
||||||
* Functions for the built-in type "RelativeTime".
|
* Functions for the built-in type "RelativeTime".
|
||||||
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -33,12 +33,6 @@
|
|||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static AbsoluteTime tm2abstime(struct tm * tm, int tz);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define MIN_DAYNUM -24856 /* December 13, 1901 */
|
#define MIN_DAYNUM -24856 /* December 13, 1901 */
|
||||||
#define MAX_DAYNUM 24854 /* January 18, 2038 */
|
#define MAX_DAYNUM 24854 /* January 18, 2038 */
|
||||||
|
|
||||||
@ -103,6 +97,7 @@ static int sec_tab[] = {
|
|||||||
* Function prototypes -- internal to this file only
|
* Function prototypes -- internal to this file only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static AbsoluteTime tm2abstime(struct tm * tm, int tz);
|
||||||
static void reltime2tm(RelativeTime time, struct tm * tm);
|
static void reltime2tm(RelativeTime time, struct tm * tm);
|
||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
@ -115,6 +110,7 @@ static int istinterval(char *i_string,
|
|||||||
AbsoluteTime *i_start,
|
AbsoluteTime *i_start,
|
||||||
AbsoluteTime *i_end);
|
AbsoluteTime *i_end);
|
||||||
|
|
||||||
|
|
||||||
/* GetCurrentAbsoluteTime()
|
/* GetCurrentAbsoluteTime()
|
||||||
* Get the current system time. Set timezone parameters if not specified elsewhere.
|
* Get the current system time. Set timezone parameters if not specified elsewhere.
|
||||||
* Define HasTZSet to allow clients to specify the default timezone.
|
* 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
|
static AbsoluteTime
|
||||||
tm2abstime(struct tm * tm, int tz)
|
tm2abstime(struct tm * tm, int tz)
|
||||||
{
|
{
|
||||||
int day,
|
int day;
|
||||||
sec;
|
AbsoluteTime sec;
|
||||||
|
|
||||||
/* validate, before going out of range on some members */
|
/* validate, before going out of range on some members */
|
||||||
if (tm->tm_year < 1901 || tm->tm_year > 2038
|
if (tm->tm_year < 1901 || tm->tm_year > 2038
|
||||||
|
Reference in New Issue
Block a user