aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-07-15 19:21:43 +0000
committerBruce Momjian <bruce@momjian.us>1999-07-15 19:21:43 +0000
commitfb38a5d8cfd05ae7890f6b319aa5983ccf12f21b (patch)
tree2de311b12820b7ba5d8348d4290324cb809e4af6 /src
parent353eb3dadf1203bc5bc3445fe0764991329f60bc (diff)
downloadpostgresql-fb38a5d8cfd05ae7890f6b319aa5983ccf12f21b.tar.gz
postgresql-fb38a5d8cfd05ae7890f6b319aa5983ccf12f21b.zip
Remove un-needed #include's from *.c files.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/arrayfuncs.c3
-rw-r--r--src/backend/utils/adt/arrayutils.c4
-rwxr-xr-xsrc/tools/pginclude/pginclude3
-rwxr-xr-xsrc/tools/pginclude/pgnoinclude10
4 files changed, 11 insertions, 9 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 0d97bb0a1c5..ddbabadedad 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.44 1999/07/15 15:20:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.45 1999/07/15 19:21:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,7 +27,6 @@
#include "storage/fd.h"
#include "fmgr.h"
#include "utils/array.h"
-
#include "libpq/libpq-fs.h"
#include "libpq/be-fsstubs.h"
diff --git a/src/backend/utils/adt/arrayutils.c b/src/backend/utils/adt/arrayutils.c
index 4514a3bcc55..fb1619edf41 100644
--- a/src/backend/utils/adt/arrayutils.c
+++ b/src/backend/utils/adt/arrayutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.8 1999/07/15 15:20:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.9 1999/07/15 19:21:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@
#define WEAK_C_OPTIMIZER
#include "postgres.h"
-
+#include "utils/array.h"
int
GetOffset(int n, int *dim, int *lb, int *indx)
{
diff --git a/src/tools/pginclude/pginclude b/src/tools/pginclude/pginclude
index c0b6795be47..08b6d321796 100755
--- a/src/tools/pginclude/pginclude
+++ b/src/tools/pginclude/pginclude
@@ -5,10 +5,11 @@ do
sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a
echo "#include \"postgres.h\"" >/tmp/$$.c
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c
+ echo "void include_test(void);" >>/tmp/$$.c
echo "void include_test() {" >>/tmp/$$.c
pgdefine "$FILE" >>/tmp/$$.c
echo "}" >>/tmp/$$.c
- cc -Werror -Wall -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
+ cc -fsyntax-only -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
if [ "$?" -ne 0 ]
then echo "$FILE"
if [ "$1" = "-v" ]
diff --git a/src/tools/pginclude/pgnoinclude b/src/tools/pginclude/pgnoinclude
index c7825a0c6ff..37ef46c85af 100755
--- a/src/tools/pginclude/pgnoinclude
+++ b/src/tools/pginclude/pgnoinclude
@@ -1,6 +1,6 @@
:
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
-find . \( -name CVS -a -prune \) -o -type f -print | grep -v postgres.h |
+find . \( -name CVS -a -prune \) -o -type f -print | grep -v '\./postgres.h' |
while read FILE
do
if [ "`echo $FILE | sed -n 's/^.*\.\([^\.]*\)$/\1/p'`" = "h" ]
@@ -18,6 +18,7 @@ do
while read INCLUDE
do
[ -s /usr/include/$INCLUDE ] && continue
+ [ "$INCLUDE" = postgres.h ] && continue
cat /tmp/$$a |
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
if [ "$IS_INCLUDE" = "Y" ]
@@ -25,17 +26,18 @@ do
else >/tmp/$$.c
fi
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
+ echo "void include_test(void);" >>/tmp/$$.c
echo "void include_test() {" >>/tmp/$$.c
if [ "$IS_INCLUDE" = "Y" ]
then pgdefine "$FILE" >>/tmp/$$.c
fi
echo "}" >>/tmp/$$.c
- cc -Werror -Wall -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
+ cc -fsyntax-only -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
if [ "$?" -eq 0 ]
then echo "$FILE $INCLUDE"
if [ "$IS_INCLUDE" = "N" ]
- then grep -v '#include[ ]*[<"]$FILE[>"]' >/tmp/$$a
- mv /tmp/$$a "$FILE"
+ then grep -v '#include[ ]*[<"]$INCLUDE[>"]' $FILE >/tmp/$$b
+ mv /tmp/$$b "$FILE"
fi
if [ "$1" = "-v" ]
then cat /tmp/$$