Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7640f93

Browse files
committed
Fix assorted header files that failed to compile standalone.
We have a longstanding project convention that all .h files shouldbe includable with no prerequisites other than postgres.h. This istested/relied-on by cpluspluscheck. However, cpluspluscheck has nothistorically been applied to most headers outside the src/includetree, 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: withoutit, my C++ compiler whines that the function is unused. There'snot so many call sites that "inline" is going to cost much, andbesides all the callers are in test code that we really don't careabout 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
1 parent9e58705 commit7640f93

File tree

13 files changed

+27
-2
lines changed

13 files changed

+27
-2
lines changed

‎src/bin/pg_waldump/rmgrdesc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndefRMGRDESC_H
99
#defineRMGRDESC_H
1010

11+
#include"access/xlogreader.h"
1112
#include"lib/stringinfo.h"
1213

1314
typedefstructRmgrDescData

‎src/bin/psql/crosstabview.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndefCROSSTABVIEW_H
1010
#defineCROSSTABVIEW_H
1111

12+
#include"libpq-fe.h"
13+
1214
/*
1315
* Limit the number of output columns generated in memory by the crosstabview
1416
* algorithm. A new output column is added for each distinct value found in the

‎src/interfaces/ecpg/ecpglib/ecpglib_extern.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include"sqlda-native.h"
99
#include"sqlda-compat.h"
1010
#include"ecpg_config.h"
11+
#include"ecpgtype.h"
1112

1213
#ifndefCHAR_BIT
1314
#include<limits.h>

‎src/interfaces/ecpg/test/printf_hack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* print_double(x) has the same effect as printf("%g", x), but is intended
33
* to produce the same formatting across all platforms.
44
*/
5-
staticvoid
5+
staticinlinevoid
66
print_double(doublex)
77
{
88
#ifdefWIN32

‎src/interfaces/libpq/fe-gssapi-common.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
#include"libpq-fe.h"
1717
#include"libpq-int.h"
1818

19+
#ifdefENABLE_GSS
20+
1921
voidpg_GSS_error(constchar*mprefix,PGconn*conn,
2022
OM_uint32maj_stat,OM_uint32min_stat);
2123
boolpg_GSS_have_ccache(gss_cred_id_t*cred_out);
2224
intpg_GSS_load_servicename(PGconn*conn);
25+
26+
#endif
27+
2328
#endif/* FE_GSSAPI_COMMON_H */

‎src/pl/plperl/plperl_helpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#include"mb/pg_wchar.h"
55

6+
#include"plperl.h"
7+
8+
69
/*
710
* convert from utf8 to database encoding
811
*

‎src/pl/plpython/plpy_elog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndefPLPY_ELOG_H
66
#definePLPY_ELOG_H
77

8+
#include"plpython.h"
9+
810
/* global exception classes */
911
externPyObject*PLy_exc_error;
1012
externPyObject*PLy_exc_fatal;

‎src/pl/plpython/plpy_resultobject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include"access/tupdesc.h"
99

10+
#include"plpython.h"
11+
1012

1113
typedefstructPLyResultObject
1214
{

‎src/pl/plpython/plpy_spi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include"utils/resowner.h"
99

10+
#include"plpython.h"
11+
1012
externPyObject*PLy_spi_prepare(PyObject*self,PyObject*args);
1113
externPyObject*PLy_spi_execute(PyObject*self,PyObject*args);
1214
externPyObject*PLy_spi_execute_plan(PyObject*ob,PyObject*list,longlimit);

‎src/pl/plpython/plpy_subxactobject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include"nodes/pg_list.h"
99
#include"utils/resowner.h"
1010

11+
#include"plpython.h"
12+
1113
/* a list of nested explicit subtransactions */
1214
externList*explicit_subtransactions;
1315

‎src/pl/plpython/plpy_typeio.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include"fmgr.h"
1010
#include"utils/typcache.h"
1111

12+
#include"plpython.h"
13+
1214
structPLyProcedure;/* avoid requiring plpy_procedure.h here */
1315

1416

‎src/pl/plpython/plpy_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#ifndefPLPY_UTIL_H
77
#definePLPY_UTIL_H
88

9+
#include"plpython.h"
10+
911
externPyObject*PLyUnicode_Bytes(PyObject*unicode);
1012
externchar*PLyUnicode_AsString(PyObject*unicode);
1113

‎src/pl/plpython/plpython.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
/*
1616
* Include order should be: postgres.h, other postgres headers, plpython.h,
17-
* other plpython headers
17+
* other plpython headers. (In practice, other plpython headers will also
18+
* include this file, so that they can compile standalone.)
1819
*/
1920
#ifndefPOSTGRES_H
2021
#error postgres.h must be included before plpython.h

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp