pgsql: headerscheck: Avoid mutual inclusion of pg_config.h and c.h

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: headerscheck: Avoid mutual inclusion of pg_config.h and c.h
Дата
Msg-id E1w77pX-0027cg-0x@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
headerscheck: Avoid mutual inclusion of pg_config.h and c.h

Headers that c.h includes early should not have another header
included before them in the headerscheck test file, especially not
c.h.

A particular instance of a problem is that pg_config.h defines some
symbols that c.h later undefines in some cases, such as in the code
added by commit cd083b54bd67, but there were also some before that.
This only works correctly if pg_config.h is included first.

pg_config_manual.h and pg_config_os.h are closely related to
pg_config.h and should be treated the same way.

postgres_ext.h is meant to be usable standalone, so testing it with
c.h included first defeats the point.

c.h also includes port.h, but this commit leaves that alone, since
port.h does need some of c.h to be processed first.  (But because of
header guards, testing port.h separately is probably ineffective.)

Discussion: https://www.postgresql.org/message-id/flat/579116be-5016-4dbc-aed0-c06f8d9f5bbb%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c546f008cddf9319ce500321a65eec2329ae6d6a

Modified Files
--------------
src/tools/pginclude/headerscheck | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)


В списке pgsql-committers по дате отправления: