|
|
|
@ -13,14 +13,20 @@ find . \( -name .git -a -prune \) -o -name '*.h' -type f -print | while read FIL |
|
|
|
|
do |
|
|
|
|
sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a |
|
|
|
|
echo "#include \"postgres.h\"" >/tmp/$$.c |
|
|
|
|
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
# supress fcinfo errors |
|
|
|
|
echo "#undef PG_GETARG_DATUM" >>/tmp/$$.c |
|
|
|
|
echo "#define PG_GETARG_DATUM(n)" >>/tmp/$$.c |
|
|
|
|
echo "void include_test(void);" >>/tmp/$$.c |
|
|
|
|
echo "void include_test() {" >>/tmp/$$.c |
|
|
|
|
echo "struct {Datum arg[1];} *fcinfo;" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
echo "Datum include_test(void);" >>/tmp/$$.c |
|
|
|
|
echo "Datum include_test() {" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
pgdefine "$FILE" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
echo "return (Datum)0;" >>/tmp/$$.c |
|
|
|
|
echo "}" >>/tmp/$$.c |
|
|
|
|
|
|
|
|
|
# Use -O1 to get warnings only generated by optimization, |
|
|
|
|
# but -O2 is too slow. |
|
|
|
|
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \ |
|
|
|
|