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
4d7e5a5d
Commit
4d7e5a5d
authored
Oct 07, 2019
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove use of deprecated Autoconf define
Change from HAVE_TM_ZONE to HAVE_STRUCT_TM_TM_ZONE.
parent
6a5084ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/pgtypeslib/dt_common.c
+2
-2
src/interfaces/ecpg/pgtypeslib/timestamp.c
src/interfaces/ecpg/pgtypeslib/timestamp.c
+4
-4
No files found.
src/interfaces/ecpg/pgtypeslib/dt_common.c
View file @
4d7e5a5d
...
@@ -995,7 +995,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
...
@@ -995,7 +995,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
tm
->
tm_sec
=
tx
->
tm_sec
;
tm
->
tm_sec
=
tx
->
tm_sec
;
tm
->
tm_isdst
=
tx
->
tm_isdst
;
tm
->
tm_isdst
=
tx
->
tm_isdst
;
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_
STRUCT_TM_
TM_ZONE)
tm
->
tm_gmtoff
=
tx
->
tm_gmtoff
;
tm
->
tm_gmtoff
=
tx
->
tm_gmtoff
;
tm
->
tm_zone
=
tx
->
tm_zone
;
tm
->
tm_zone
=
tx
->
tm_zone
;
...
@@ -1041,7 +1041,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
...
@@ -1041,7 +1041,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
}
}
else
else
tm
->
tm_isdst
=
-
1
;
tm
->
tm_isdst
=
-
1
;
#else
/* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
#else
/* not (HAVE_
STRUCT_TM_
TM_ZONE || HAVE_INT_TIMEZONE) */
if
(
tzp
!=
NULL
)
if
(
tzp
!=
NULL
)
{
{
/* default to UTC */
/* default to UTC */
...
...
src/interfaces/ecpg/pgtypeslib/timestamp.c
View file @
4d7e5a5d
...
@@ -100,7 +100,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
...
@@ -100,7 +100,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
int64
dDate
,
int64
dDate
,
date0
;
date0
;
int64
time
;
int64
time
;
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
#if defined(HAVE_
STRUCT_TM_
TM_ZONE) || defined(HAVE_INT_TIMEZONE)
time_t
utime
;
time_t
utime
;
struct
tm
*
tx
;
struct
tm
*
tx
;
#endif
#endif
...
@@ -134,7 +134,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
...
@@ -134,7 +134,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
*/
*/
if
(
IS_VALID_UTIME
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
))
if
(
IS_VALID_UTIME
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
))
{
{
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
#if defined(HAVE_
STRUCT_TM_
TM_ZONE) || defined(HAVE_INT_TIMEZONE)
utime
=
dt
/
USECS_PER_SEC
+
utime
=
dt
/
USECS_PER_SEC
+
((
date0
-
date2j
(
1970
,
1
,
1
))
*
INT64CONST
(
86400
));
((
date0
-
date2j
(
1970
,
1
,
1
))
*
INT64CONST
(
86400
));
...
@@ -147,7 +147,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
...
@@ -147,7 +147,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
tm
->
tm_min
=
tx
->
tm_min
;
tm
->
tm_min
=
tx
->
tm_min
;
tm
->
tm_isdst
=
tx
->
tm_isdst
;
tm
->
tm_isdst
=
tx
->
tm_isdst
;
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_
STRUCT_TM_
TM_ZONE)
tm
->
tm_gmtoff
=
tx
->
tm_gmtoff
;
tm
->
tm_gmtoff
=
tx
->
tm_gmtoff
;
tm
->
tm_zone
=
tx
->
tm_zone
;
tm
->
tm_zone
=
tx
->
tm_zone
;
...
@@ -159,7 +159,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
...
@@ -159,7 +159,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
TZNAME_GLOBAL
[(
tm
->
tm_isdst
>
0
)];
*
tzn
=
TZNAME_GLOBAL
[(
tm
->
tm_isdst
>
0
)];
#endif
#endif
#else
/* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
#else
/* not (HAVE_
STRUCT_TM_
TM_ZONE || HAVE_INT_TIMEZONE) */
*
tzp
=
0
;
*
tzp
=
0
;
/* Mark this as *no* time zone available */
/* Mark this as *no* time zone available */
tm
->
tm_isdst
=
-
1
;
tm
->
tm_isdst
=
-
1
;
...
...
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