Skip to content

Commit 224f6e5

Browse files
committed
Exclude utils/probes.h and pg_trace.h from cpluspluscheck
They can include sys/sdt.h from SystemTap, which itself contains C++ code and so won't compile with a C++ compiler under extern "C" linkage.
1 parent 0fe397f commit 224f6e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/pginclude/cpluspluscheck

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ trap 'rm -rf $tmp' 0 1 2 3 15
1717
# regex/regerrs.h is not meant to be included standalone.
1818
# parser/gram.h will be included by parser/gramparse.h.
1919
# parser/kwlist.h is not meant to be included standalone.
20+
# pg_trace.h and utils/probes.h can include sys/sdt.h from SystemTap,
21+
# which itself contains C++ code and so won't compile with a C++
22+
# compiler under extern "C" linkage.
2023

2124
for f in `find src/include src/interfaces/libpq/libpq-fe.h src/interfaces/libpq/libpq-events.h -name '*.h' -print | \
2225
grep -v -e ^src/include/port/ \
2326
-e ^src/include/rusagestub.h -e ^src/include/regex/regerrs.h \
24-
-e ^src/include/parser/gram.h -e ^src/include/parser/kwlist.h`
27+
-e ^src/include/parser/gram.h -e ^src/include/parser/kwlist.h \
28+
-e ^src/include/pg_trace.h -e ^src/include/utils/probes.h`
2529
do
2630
{
2731
echo ' extern "C" {'

0 commit comments

Comments
 (0)