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
89c7369d
Commit
89c7369d
authored
Apr 26, 1999
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
parent
c84ea433
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
6 deletions
+35
-6
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datetime.c
+5
-1
src/backend/utils/adt/dt.c
src/backend/utils/adt/dt.c
+19
-3
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+11
-2
No files found.
src/backend/utils/adt/datetime.c
View file @
89c7369d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.3
1 1999/04/15 02:22:37 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.3
2 1999/04/26 04:42:48 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -360,7 +360,11 @@ date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
...
@@ -360,7 +360,11 @@ date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
#else
#else
...
...
src/backend/utils/adt/dt.c
View file @
89c7369d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.6
8 1999/04/15 02:22:39 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.6
9 1999/04/26 04:42:48 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1451,7 +1451,13 @@ datetime_trunc(text *units, DateTime *datetime)
...
@@ -1451,7 +1451,13 @@ datetime_trunc(text *units, DateTime *datetime)
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_TM_ZONE)
tz
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
tz
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
tz
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezone
);
#ifdef __CYGWIN__
tz
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
tz
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
#else
#else
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#endif
...
@@ -2434,7 +2440,11 @@ datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
...
@@ -2434,7 +2440,11 @@ datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
#else
#else
...
@@ -3058,7 +3068,13 @@ DecodeDateTime(char **field, int *ftype, int nf,
...
@@ -3058,7 +3068,13 @@ DecodeDateTime(char **field, int *ftype, int nf,
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_TM_ZONE)
*
tzp
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
*
tzp
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezone
);
#ifdef __CYGWIN__
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
_timezone
-
3600
)
:
_timez
one
);
#else
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezon
e
);
#endif
#else
#else
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#endif
...
...
src/backend/utils/adt/nabstime.c
View file @
89c7369d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nabstime.c,v 1.5
3 1999/02/21 03:49:32 scrappy
Exp $
* $Id: nabstime.c,v 1.5
4 1999/04/26 04:42:49 ishii
Exp $
*
*
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void)
...
@@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void)
tm
=
localtime
(
&
now
);
tm
=
localtime
(
&
now
);
CDayLight
=
tm
->
tm_isdst
;
CDayLight
=
tm
->
tm_isdst
;
CTimeZone
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
CTimeZone
=
#ifdef __CYGWIN32__
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
strcpy
(
CTZName
,
tzname
[
tm
->
tm_isdst
]);
strcpy
(
CTZName
,
tzname
[
tm
->
tm_isdst
]);
#else
#else
#error USE_POSIX_TIME defined but no time zone available
#error USE_POSIX_TIME defined but no time zone available
...
@@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
...
@@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
strcpy
(
tzn
,
tm
->
tm_zone
);
strcpy
(
tzn
,
tm
->
tm_zone
);
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
if
(
tzp
!=
NULL
)
if
(
tzp
!=
NULL
)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
strcpy
(
tzn
,
tzname
[
tm
->
tm_isdst
]);
strcpy
(
tzn
,
tzname
[
tm
->
tm_isdst
]);
#else
#else
...
...
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