Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a787b88

Browse files
committed
Eliminate need for cpp-from-stdin by using a temp file.
1 parent 1f27fac commit a787b88

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/backend/catalog/genbki.sh.in

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
#
1111
#
1212
# IDENTIFICATION
13-
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.1 1998/10/14 16:05:01 thomas Exp $
13+
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.2 1998/10/28 19:38:46 tgl Exp $
1414
#
1515
# NOTES
1616
# non-essential whitespace is removed from the generated file.
1717
# if this is ever a problem, then the sed script at the very
1818
# end can be changed into another awk script or something smarter..
1919
#
2020
#-------------------------------------------------------------------------
21-
trap "rm -f /tmp/genbki.tmp" 0 1 2 3 15
21+
trap "rm -f /tmp/genbki.tmp /tmp/genbkitmp.c" 0 1 2 3 15
2222

2323
# make sure it is empty
2424
>/tmp/genbki.tmp
@@ -261,8 +261,9 @@ END {
261261
reln_open = 0;
262262
}
263263
}
264-
' | \
265-
@CPP@ @CPPSTDIN@ $BKIOPTS | \
264+
' >/tmp/genbkitmp.c
265+
266+
@CPP@ $BKIOPTS /tmp/genbkitmp.c | \
266267
sed -e '/^[ ]*$/d' \
267268
-e 's/[ ][ ]*/ /g' || exit 1
268269

src/backend/utils/Gen_fmgrtab.sh.in

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.11 1998/10/26 01:04:04 tgl Exp $
11+
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.12 1998/10/28 19:38:47 tgl Exp $
1212
#
1313
# NOTES
1414
# Passes any -D options on to cpp prior to generating the list
@@ -40,6 +40,7 @@ done
4040

4141
INFILE=$1
4242
RAWFILE=fmgr.raw
43+
CPPTMPFILE=fmgrtmp.c
4344
HFILE=fmgr.h
4445
TABCFILE=fmgrtab.c
4546

@@ -62,11 +63,14 @@ sed -e 's/^.*OID[^=]*=[^0-9]*//' \
6263
-e 's/[ ]*).*$//' | \
6364
awk '
6465
/^#/ { print; next; }
65-
$4 == "11" { print; next; }' | \
66-
@CPP@ @CPPSTDIN@ $BKIOPTS | \
66+
$4 == "11" { print; next; }' > $CPPTMPFILE
67+
68+
@CPP@ $BKIOPTS $CPPTMPFILE | \
6769
egrep '^[0-9]' | \
6870
sort -n > $RAWFILE
6971

72+
rm -f $CPPTMPFILE
73+
7074
#
7175
# Generate fmgr.h
7276
#
@@ -79,7 +83,7 @@ cat > $HFILE <<FuNkYfMgRsTuFf
7983
*
8084
* Copyright (c) 1994, Regents of the University of California
8185
*
82-
* $Id: Gen_fmgrtab.sh.in,v 1.11 1998/10/26 01:04:04 tgl Exp $
86+
* $Id: Gen_fmgrtab.sh.in,v 1.12 1998/10/28 19:38:47 tgl Exp $
8387
*
8488
* NOTES
8589
* ******************************
@@ -193,7 +197,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
193197
*
194198
*
195199
* IDENTIFICATION
196-
* $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.11 1998/10/26 01:04:04 tgl Exp $
200+
* $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.12 1998/10/28 19:38:47 tgl Exp $
197201
*
198202
* NOTES
199203
*

0 commit comments

Comments
 (0)