Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2019-08-19 18:22:56 +0000
committerTom Lane2019-08-19 18:22:56 +0000
commit55ea109188474dae22d90f743d7189a8bdf94d49 (patch)
treee2733deaf9a64f398718324655b890bd0359cb88 /src/tools/pginclude/cpluspluscheck
parenta12079109686e75c833b0b04925af8cb2fa011c0 (diff)
Add "headerscheck" script to test header-file compilability under C.
We already had "cpluspluscheck", which served the dual purposes of verifying that headers compile standalone and that they compile as C++. However, C++ compilers don't have the exact same set of error conditions as C compilers, so this doesn't really prove that a header will compile standalone as C. Hence, add a second script that's largely similar but runs the C compiler not C++. Also add a bit more documentation than the none-at-all we had before. Discussion: https://postgr.es/m/14803.1566175851@sss.pgh.pa.us
Diffstat (limited to 'src/tools/pginclude/cpluspluscheck')
-rwxr-xr-xsrc/tools/pginclude/cpluspluscheck5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck
index b2060f3f538..843d391e682 100755
--- a/src/tools/pginclude/cpluspluscheck
+++ b/src/tools/pginclude/cpluspluscheck
@@ -7,8 +7,13 @@
# default to the current directory.
#
# Needs to be run after configuring and creating all generated headers.
+# It's advisable to configure --with-perl --with-python, else you're
+# likely to get errors from associated headers.
#
# No output if everything is OK, else compiler errors.
+#
+# src/tools/pginclude/cpluspluscheck
+# Copyright (c) 2009-2019, PostgreSQL Global Development Group
if [ -z "$1" ]; then
srcdir="."