mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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
This commit is contained in:
@ -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' \
|
||||
|
Reference in New Issue
Block a user