1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00

Fix assorted header files that failed to compile standalone.

We have a longstanding project convention that all .h files should
be includable with no prerequisites other than postgres.h.  This is
tested/relied-on by cpluspluscheck.  However, cpluspluscheck has not
historically been applied to most headers outside the src/include
tree, with the predictable consequence that some of them don't work.
Fix that, usually by adding missing #include dependencies.

The change in printf_hack.h might require some explanation: without
it, my C++ compiler whines that the function is unused.  There's
not so many call sites that "inline" is going to cost much, and
besides all the callers are in test code that we really don't care
about the size of.

There's no actual bugs being fixed here, so I see no need to back-patch.

Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
This commit is contained in:
Tom Lane
2019-05-31 11:45:33 -04:00
parent 9e58705a7f
commit 7640f93123
13 changed files with 27 additions and 2 deletions

View File

@ -14,7 +14,8 @@
/*
* Include order should be: postgres.h, other postgres headers, plpython.h,
* other plpython headers
* other plpython headers. (In practice, other plpython headers will also
* include this file, so that they can compile standalone.)
*/
#ifndef POSTGRES_H
#error postgres.h must be included before plpython.h