Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
353eb3da
Commit
353eb3da
authored
Jul 15, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add updates.
parent
3c4447fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
src/tools/pginclude/pginclude
src/tools/pginclude/pginclude
+1
-1
src/tools/pginclude/pgnoinclude
src/tools/pginclude/pgnoinclude
+23
-5
No files found.
src/tools/pginclude/pginclude
View file @
353eb3da
...
@@ -5,7 +5,7 @@ do
...
@@ -5,7 +5,7 @@ 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
main
() {" >>/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 -Werror -Wall -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
...
...
src/tools/pginclude/pgnoinclude
View file @
353eb3da
:
:
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 | while read FILE
find . \( -name CVS -a -prune \) -o -type f -print | grep -v postgres.h |
while read FILE
do
do
cat "$FILE" | grep -v "^#if" | grep -v "^#else" |
if [ "`echo $FILE | sed -n 's/^.*\.\([^\.]*\)$/\1/p'`" = "h" ]
then IS_INCLUDE="Y"
else IS_INCLUDE="N"
fi
if [ "$IS_INCLUDE" = "Y" ]
then cat "$FILE" | grep -v "^#if" | grep -v "^#else" |
grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a
grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a
else cat "$FILE" >/tmp/$$a
fi
cat /tmp/$$a | grep "^#include" |
cat /tmp/$$a | grep "^#include" |
sed 's/#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
sed 's/#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
while read INCLUDE
while read INCLUDE
...
@@ -11,14 +20,23 @@ do
...
@@ -11,14 +20,23 @@ do
[ -s /usr/include/$INCLUDE ] && continue
[ -s /usr/include/$INCLUDE ] && continue
cat /tmp/$$a |
cat /tmp/$$a |
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
echo "#include \"postgres.h\"" >/tmp/$$.c
if [ "$IS_INCLUDE" = "Y" ]
then echo "#include \"postgres.h\"" >/tmp/$$.c
else >/tmp/$$.c
fi
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
echo "void main() {" >>/tmp/$$.c
echo "void include_test() {" >>/tmp/$$.c
pgdefine "$FILE" >>/tmp/$$.c
if [ "$IS_INCLUDE" = "Y" ]
then pgdefine "$FILE" >>/tmp/$$.c
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 -Werror -Wall -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" ]
then grep -v '#include[ ]*[<"]$FILE[>"]' >/tmp/$$a
mv /tmp/$$a "$FILE"
fi
if [ "$1" = "-v" ]
if [ "$1" = "-v" ]
then cat /tmp/$$
then cat /tmp/$$
cat /tmp/$$.c
cat /tmp/$$.c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment