mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Portability fix for zic.c.
Missed an inttypes.h dependency in previous patch. Per buildfarm.
This commit is contained in:
parent
28aa0ee4fd
commit
578cb33dfb
@ -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/intmax_t/int64/g' \
|
||||||
-e 's/INT32_MIN/PG_INT32_MIN/g' \
|
-e 's/INT32_MIN/PG_INT32_MIN/g' \
|
||||||
-e 's/INT32_MAX/PG_INT32_MAX/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/struct[ \t]+tm\b/struct pg_tm/g' \
|
||||||
-e 's/\btime_t\b/pg_time_t/g' \
|
-e 's/\btime_t\b/pg_time_t/g' \
|
||||||
-e 's/lineno/lineno_t/g' \
|
-e 's/lineno/lineno_t/g' \
|
||||||
|
@ -599,7 +599,7 @@ timerange_option(char *timerange)
|
|||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
lo = strtoimax(timerange + 1, &lo_end, 10);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
hi_end = lo_end;
|
hi_end = lo_end;
|
||||||
@ -607,9 +607,9 @@ timerange_option(char *timerange)
|
|||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
hi = strtoimax(lo_end + 2, &hi_end, 10);
|
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;
|
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)
|
if (*hi_end || hi < lo || max_time < lo || hi < min_time)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user