Skip to content

Commit a977db6

Browse files
committed
Tweak cpluspluscheck to avoid directly #include'ing gram.h.
gram.h has ordering dependencies, which are satisfied when it's included from gramparse.h, but might not be if it's pulled in directly.
1 parent 2754119 commit a977db6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/tools/pginclude/cpluspluscheck

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ tmp=`mktemp -d /tmp/$me.XXXXXX`
1515
echo ' extern "C" {'
1616
echo '#include "postgres.h"'
1717

18-
# Omit port/, because it's platform specific, and c.h includes it anyway. Omit
19-
# regex/ and snowball/, because those files came from elsewhere, and they would
20-
# need extra work if someone cared to fix them. kwlist.h is not meant to be
21-
# included directly. rusagestub.h will be included by ./utils/pg_rusage.h if
22-
# necessary.
23-
for file in `find . \( -name port -prune -o -name regex -prune -o -name snowball -prune \) -o -name '*.h' -not -name kwlist.h -not -name rusagestub.h -print`; do
18+
# Omit port/, because it's platform specific, and c.h includes the relevant
19+
# file anyway.
20+
# Omit regex/ and snowball/, because those files came from elsewhere, and
21+
# they would need extra work if someone cared to fix them.
22+
# gram.h will be included by ./parser/gramparse.h.
23+
# kwlist.h is not meant to be included without having defined PG_KEYWORD.
24+
# rusagestub.h will be included by ./utils/pg_rusage.h if necessary.
25+
for file in `find . \( -name port -prune -o -name regex -prune -o -name snowball -prune \) -o -name '*.h' -not -name gram.h -not -name kwlist.h -not -name rusagestub.h -print`; do
2426
f=`echo $file | sed 's,^\./,,'`
2527
echo "#include \"$f\""
2628
done

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy