File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
:
2
2
# remove extra #include's
3
3
4
- # $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.5 2006/07/10 16:45:44 momjian Exp $
4
+ # $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.6 2006/07/11 19:25:41 momjian Exp $
5
5
6
6
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
7
7
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
39
39
grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
40
40
egrep -q '^#else|^#endif' && continue
41
41
42
+ # set up initial file contents
42
43
cat /tmp/$$a |
43
44
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
44
45
if [ "$IS_INCLUDE" = "Y" ]
45
46
then echo "#include \"postgres.h\"" >/tmp/$$.c
46
47
else >/tmp/$$.c
47
48
fi
49
+
48
50
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
49
51
echo "void include_test(void);" >>/tmp/$$.c
50
52
echo "void include_test() {" >>/tmp/$$.c
51
53
if [ "$IS_INCLUDE" = "Y" ]
52
54
then pgdefine "$FILE" >>/tmp/$$.c
53
55
fi
54
56
echo "}" >>/tmp/$$.c
57
+
55
58
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
56
59
if [ "$?" -eq 0 ]
57
60
then echo "$FILE $INCLUDE"
You can’t perform that action at this time.
0 commit comments