Skip to content

Commit 4399e81

Browse files
committed
In pgrminclude, make skipped include names constent and skip files with
#if/#ifdefs.
1 parent eb013ed commit 4399e81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/pginclude/pgrminclude

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
77
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
88
grep -v '\./postgres.h' |
9+
grep -v '\./postgres_fe.h' |
910
grep -v '\./pg_config.h' |
1011
grep -v '\./c.h' |
1112
while read FILE
1213
do
14+
# Skip files with #if and #ifdef blocks because the blocks
15+
# might contain code that is not compiled on this platform.
16+
grep -q '^if' "$FILE" && continue
17+
1318
if [ `expr $FILE : '.*\.h$'` -ne 0 ]
1419
then IS_INCLUDE="Y"
1520
else IS_INCLUDE="N"
@@ -27,7 +32,7 @@ do
2732
[ -s /usr/include/$INCLUDE ] && continue
2833
[ "$INCLUDE" = postgres.h ] && continue
2934
[ "$INCLUDE" = postgres_fe.h ] && continue
30-
[ "$INCLUDE" = config.h ] && continue
35+
[ "$INCLUDE" = pg_config.h ] && continue
3136
[ "$INCLUDE" = c.h ] && continue
3237

3338
# preserve configure-specific includes

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy