Remove un-needed #include's from *.c files.
This commit is contained in:
parent
353eb3dadf
commit
fb38a5d8cf
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 "storage/fd.h"
|
||||||
#include "fmgr.h"
|
#include "fmgr.h"
|
||||||
#include "utils/array.h"
|
#include "utils/array.h"
|
||||||
|
|
||||||
#include "libpq/libpq-fs.h"
|
#include "libpq/libpq-fs.h"
|
||||||
#include "libpq/be-fsstubs.h"
|
#include "libpq/be-fsstubs.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
#define WEAK_C_OPTIMIZER
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
#include "utils/array.h"
|
||||||
int
|
int
|
||||||
GetOffset(int n, int *dim, int *lb, int *indx)
|
GetOffset(int n, int *dim, int *lb, int *indx)
|
||||||
{
|
{
|
||||||
|
@ -5,10 +5,11 @@ do
|
|||||||
sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a
|
sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a
|
||||||
echo "#include \"postgres.h\"" >/tmp/$$.c
|
echo "#include \"postgres.h\"" >/tmp/$$.c
|
||||||
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c
|
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c
|
||||||
|
echo "void include_test(void);" >>/tmp/$$.c
|
||||||
echo "void include_test() {" >>/tmp/$$.c
|
echo "void include_test() {" >>/tmp/$$.c
|
||||||
pgdefine "$FILE" >>/tmp/$$.c
|
pgdefine "$FILE" >>/tmp/$$.c
|
||||||
echo "}" >>/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 ]
|
if [ "$?" -ne 0 ]
|
||||||
then echo "$FILE"
|
then echo "$FILE"
|
||||||
if [ "$1" = "-v" ]
|
if [ "$1" = "-v" ]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
:
|
:
|
||||||
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
|
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
|
while read FILE
|
||||||
do
|
do
|
||||||
if [ "`echo $FILE | sed -n 's/^.*\.\([^\.]*\)$/\1/p'`" = "h" ]
|
if [ "`echo $FILE | sed -n 's/^.*\.\([^\.]*\)$/\1/p'`" = "h" ]
|
||||||
@ -18,6 +18,7 @@ do
|
|||||||
while read INCLUDE
|
while read INCLUDE
|
||||||
do
|
do
|
||||||
[ -s /usr/include/$INCLUDE ] && continue
|
[ -s /usr/include/$INCLUDE ] && continue
|
||||||
|
[ "$INCLUDE" = postgres.h ] && continue
|
||||||
cat /tmp/$$a |
|
cat /tmp/$$a |
|
||||||
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
|
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
|
||||||
if [ "$IS_INCLUDE" = "Y" ]
|
if [ "$IS_INCLUDE" = "Y" ]
|
||||||
@ -25,17 +26,18 @@ do
|
|||||||
else >/tmp/$$.c
|
else >/tmp/$$.c
|
||||||
fi
|
fi
|
||||||
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
|
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
|
||||||
|
echo "void include_test(void);" >>/tmp/$$.c
|
||||||
echo "void include_test() {" >>/tmp/$$.c
|
echo "void include_test() {" >>/tmp/$$.c
|
||||||
if [ "$IS_INCLUDE" = "Y" ]
|
if [ "$IS_INCLUDE" = "Y" ]
|
||||||
then pgdefine "$FILE" >>/tmp/$$.c
|
then pgdefine "$FILE" >>/tmp/$$.c
|
||||||
fi
|
fi
|
||||||
echo "}" >>/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 [ "$?" -eq 0 ]
|
if [ "$?" -eq 0 ]
|
||||||
then echo "$FILE $INCLUDE"
|
then echo "$FILE $INCLUDE"
|
||||||
if [ "$IS_INCLUDE" = "N" ]
|
if [ "$IS_INCLUDE" = "N" ]
|
||||||
then grep -v '#include[ ]*[<"]$FILE[>"]' >/tmp/$$a
|
then grep -v '#include[ ]*[<"]$INCLUDE[>"]' $FILE >/tmp/$$b
|
||||||
mv /tmp/$$a "$FILE"
|
mv /tmp/$$b "$FILE"
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "-v" ]
|
if [ "$1" = "-v" ]
|
||||||
then cat /tmp/$$
|
then cat /tmp/$$
|
||||||
|
Loading…
x
Reference in New Issue
Block a user