diff options
| author | Peter Eisentraut | 2020-02-21 08:14:03 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2020-02-21 08:20:32 +0000 |
| commit | 957338418b69e9774ccc1bab59f765a62f0aa6f9 (patch) | |
| tree | c4e018e687ecb115bb235f87f8d3c60bcd12331f /src/timezone | |
| parent | dca3911a81f0ba823b56c3d4462419c83f385e55 (diff) | |
Require stdint.h
stdint.h belongs to the compiler (as opposed to inttypes.h), so by
requiring a C99 compiler we can also require stdint.h
unconditionally. Remove configure checks and other workarounds for
it.
This also removes a few steps in the required portability adjustments
to the imported time zone code, which can be applied on the next
import.
When using GCC on a platform that is otherwise pre-C99, this will now
require at least GCC 4.5, which is the first release that supplied a
standard-conforming stdint.h if the native platform didn't have it.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/5d398bbb-262a-5fed-d839-d0e5cff3c0d7%402ndquadrant.com
Diffstat (limited to 'src/timezone')
| -rw-r--r-- | src/timezone/README | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/timezone/README b/src/timezone/README index d3dd7b7fa6..3c593933c1 100644 --- a/src/timezone/README +++ b/src/timezone/README @@ -70,11 +70,8 @@ old-style function declarations to C89 style, but thank goodness they fixed that.) * We need the code to follow Postgres' portability conventions; this -includes relying on configure's results rather than hand-hacked #defines, -and not relying on <stdint.h> features that may not exist on old systems. -(In particular this means using Postgres' definitions of the int32 and -int64 typedefs, not int_fast32_t/int_fast64_t. Likewise we use -PG_INT32_MIN/MAX not INT32_MIN/MAX.) +includes relying on configure's results rather than hand-hacked +#defines (see private.h). * Since Postgres is typically built on a system that has its own copy of the <time.h> functions, we must avoid conflicting with those. This @@ -112,13 +109,6 @@ to first run the tzcode source files through a sed filter like this: -e 's|^\*/| */|' \ -e 's/\bregister[ \t]//g' \ -e 's/\bATTRIBUTE_PURE[ \t]//g' \ - -e 's/int_fast32_t/int32/g' \ - -e 's/int_fast64_t/int64/g' \ - -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' \ |
