aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-04-26 21:20:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-04-26 21:20:21 -0400
commita97cfd9b829158ba4d9be866c65d0937b7d3519d (patch)
tree5fd52c222fb28a24019445560a76993eaf99c161 /src
parent7898d01da35772b16f6fa6d110ee8d2f8cc32af0 (diff)
downloadpostgresql-a97cfd9b829158ba4d9be866c65d0937b7d3519d.tar.gz
postgresql-a97cfd9b829158ba4d9be866c65d0937b7d3519d.zip
Portability fix for zic.c.
Missed an inttypes.h dependency in previous patch. Per buildfarm.
Diffstat (limited to 'src')
-rw-r--r--src/timezone/README2
-rw-r--r--src/timezone/zic.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/timezone/README b/src/timezone/README
index f547d60d829..8fb26993274 100644
--- a/src/timezone/README
+++ b/src/timezone/README
@@ -117,6 +117,8 @@ to first run the tzcode source files through a sed filter like this:
-e 's/intmax_t/int64/g' \
-e 's/INT32_MIN/PG_INT32_MIN/g' \
-e 's/INT32_MAX/PG_INT32_MAX/g' \
+ -e 's/INTMAX_MIN/PG_INT64_MIN/g' \
+ -e 's/INTMAX_MAX/PG_INT64_MAX/g' \
-e 's/struct[ \t]+tm\b/struct pg_tm/g' \
-e 's/\btime_t\b/pg_time_t/g' \
-e 's/lineno/lineno_t/g' \
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index ab10165a267..de8daaee5c9 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -599,7 +599,7 @@ timerange_option(char *timerange)
{
errno = 0;
lo = strtoimax(timerange + 1, &lo_end, 10);
- if (lo_end == timerange + 1 || (lo == INTMAX_MAX && errno == ERANGE))
+ if (lo_end == timerange + 1 || (lo == PG_INT64_MAX && errno == ERANGE))
return false;
}
hi_end = lo_end;
@@ -607,9 +607,9 @@ timerange_option(char *timerange)
{
errno = 0;
hi = strtoimax(lo_end + 2, &hi_end, 10);
- if (hi_end == lo_end + 2 || hi == INTMAX_MIN)
+ if (hi_end == lo_end + 2 || hi == PG_INT64_MIN)
return false;
- hi -= !(hi == INTMAX_MAX && errno == ERANGE);
+ hi -= !(hi == PG_INT64_MAX && errno == ERANGE);
}
if (*hi_end || hi < lo || max_time < lo || hi < min_time)
return false;