Commit a977db6f authored by Tom Lane's avatar Tom Lane

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.
parent 27541191
...@@ -15,12 +15,14 @@ tmp=`mktemp -d /tmp/$me.XXXXXX` ...@@ -15,12 +15,14 @@ tmp=`mktemp -d /tmp/$me.XXXXXX`
echo ' extern "C" {' echo ' extern "C" {'
echo '#include "postgres.h"' echo '#include "postgres.h"'
# Omit port/, because it's platform specific, and c.h includes it anyway. Omit # Omit port/, because it's platform specific, and c.h includes the relevant
# regex/ and snowball/, because those files came from elsewhere, and they would # file anyway.
# need extra work if someone cared to fix them. kwlist.h is not meant to be # Omit regex/ and snowball/, because those files came from elsewhere, and
# included directly. rusagestub.h will be included by ./utils/pg_rusage.h if # they would need extra work if someone cared to fix them.
# necessary. # gram.h will be included by ./parser/gramparse.h.
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 # kwlist.h is not meant to be included without having defined PG_KEYWORD.
# rusagestub.h will be included by ./utils/pg_rusage.h if necessary.
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
f=`echo $file | sed 's,^\./,,'` f=`echo $file | sed 's,^\./,,'`
echo "#include \"$f\"" echo "#include \"$f\""
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment