Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4d7e5a5

Browse files
committed
Remove use of deprecated Autoconf define
Change from HAVE_TM_ZONE to HAVE_STRUCT_TM_TM_ZONE.
1 parent 6a5084e commit 4d7e5a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/interfaces/ecpg/pgtypeslib/dt_common.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
995995
tm->tm_sec = tx->tm_sec;
996996
tm->tm_isdst = tx->tm_isdst;
997997

998-
#if defined(HAVE_TM_ZONE)
998+
#if defined(HAVE_STRUCT_TM_TM_ZONE)
999999
tm->tm_gmtoff = tx->tm_gmtoff;
10001000
tm->tm_zone = tx->tm_zone;
10011001

@@ -1041,7 +1041,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
10411041
}
10421042
else
10431043
tm->tm_isdst = -1;
1044-
#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
1044+
#else /* not (HAVE_STRUCT_TM_TM_ZONE || HAVE_INT_TIMEZONE) */
10451045
if (tzp != NULL)
10461046
{
10471047
/* default to UTC */

src/interfaces/ecpg/pgtypeslib/timestamp.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
100100
int64 dDate,
101101
date0;
102102
int64 time;
103-
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
103+
#if defined(HAVE_STRUCT_TM_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
104104
time_t utime;
105105
struct tm *tx;
106106
#endif
@@ -134,7 +134,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
134134
*/
135135
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday))
136136
{
137-
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
137+
#if defined(HAVE_STRUCT_TM_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
138138

139139
utime = dt / USECS_PER_SEC +
140140
((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
147147
tm->tm_min = tx->tm_min;
148148
tm->tm_isdst = tx->tm_isdst;
149149

150-
#if defined(HAVE_TM_ZONE)
150+
#if defined(HAVE_STRUCT_TM_TM_ZONE)
151151
tm->tm_gmtoff = tx->tm_gmtoff;
152152
tm->tm_zone = tx->tm_zone;
153153

@@ -159,7 +159,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t
159159
if (tzn != NULL)
160160
*tzn = TZNAME_GLOBAL[(tm->tm_isdst > 0)];
161161
#endif
162-
#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
162+
#else /* not (HAVE_STRUCT_TM_TM_ZONE || HAVE_INT_TIMEZONE) */
163163
*tzp = 0;
164164
/* Mark this as *no* time zone available */
165165
tm->tm_isdst = -1;

0 commit comments

Comments
 (0)