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
ac5f11e0
Commit
ac5f11e0
authored
Aug 26, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #if blocks.
parent
00eb036c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
src/tools/pginclude/pgrminclude
src/tools/pginclude/pgrminclude
+15
-10
No files found.
src/tools/pginclude/pgrminclude
View file @
ac5f11e0
...
...
@@ -11,19 +11,18 @@ grep -v '\./pg_config.h' |
grep -v '\./c.h' |
while read FILE
do
# Skip files with #if and #ifdef blocks because the blocks
# might contain code that is not compiled on this platform.
grep -q '^#if' "$FILE" && continue
if [ `expr $FILE : '.*\.h$'` -ne 0 ]
then IS_INCLUDE="Y"
else IS_INCLUDE="N"
fi
# loop through all includes
cat "$FILE" | grep "^#include" |
cat "$FILE" |
grep "^#include\>" |
grep -v '/\* *pgrminclude *ignore *\*/' |
sed 's/^#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
grep -v 'parser/kwlist\.h' |
grep -v '\.c$' |
while read INCLUDE
do
if [ "$1" = "-v" ]
...
...
@@ -43,12 +42,18 @@ do
grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
egrep -q '^#else|^#endif' && continue
# remove defines from include files
# Remove all #if and #ifdef blocks because the blocks
# might contain code that is not compiled on this platform.
cat "$FILE" |
grep -v "^#if" |
grep -v "^#else" |
grep -v "^#endif" |
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
else cat "$FILE" >/tmp/$$a
fi
then # remove struct references
# sed 's/->[a-zA-Z0-9_\.]*//g'
cat
else cat
fi >/tmp/$$a
# set up initial file contents
grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' \
...
...
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