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

Commit 48f8fa9

Browse files
committed
Portability fix for zic.c.
Missed an inttypes.h dependency in previous patch. Per buildfarm.
1 parent a967878 commit 48f8fa9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/timezone/README

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ to first run the tzcode source files through a sed filter like this:
117117
-e 's/intmax_t/int64/g' \
118118
-e 's/INT32_MIN/PG_INT32_MIN/g' \
119119
-e 's/INT32_MAX/PG_INT32_MAX/g' \
120+
-e 's/INTMAX_MIN/PG_INT64_MIN/g' \
121+
-e 's/INTMAX_MAX/PG_INT64_MAX/g' \
120122
-e 's/struct[ \t]+tm\b/struct pg_tm/g' \
121123
-e 's/\btime_t\b/pg_time_t/g' \
122124
-e 's/lineno/lineno_t/g' \

src/timezone/zic.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -599,17 +599,17 @@ timerange_option(char *timerange)
599599
{
600600
errno = 0;
601601
lo = strtoimax(timerange + 1, &lo_end, 10);
602-
if (lo_end == timerange + 1 || (lo == INTMAX_MAX && errno == ERANGE))
602+
if (lo_end == timerange + 1 || (lo == PG_INT64_MAX && errno == ERANGE))
603603
return false;
604604
}
605605
hi_end = lo_end;
606606
if (lo_end[0] == '/' && lo_end[1] == '@')
607607
{
608608
errno = 0;
609609
hi = strtoimax(lo_end + 2, &hi_end, 10);
610-
if (hi_end == lo_end + 2 || hi == INTMAX_MIN)
610+
if (hi_end == lo_end + 2 || hi == PG_INT64_MIN)
611611
return false;
612-
hi -= !(hi == INTMAX_MAX && errno == ERANGE);
612+
hi -= !(hi == PG_INT64_MAX && errno == ERANGE);
613613
}
614614
if (*hi_end || hi < lo || max_time < lo || hi < min_time)
615615
return false;

0 commit comments

Comments
 (0)