Skip to content

Commit 3d16720

Browse files
committed
Make the .DEF file generation rules safe against tabs in exports.txt.
Per bug #5016, although I think the MSVC build scripts may need a similar fix.
1 parent 53af86c commit 3d16720

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Makefile.shlib

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.121 2009/08/26 22:24:42 petere Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.122 2009/08/27 17:55:53 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -23,7 +23,7 @@
2323
# SHLIB_LINK If shared library relies on other libraries,
2424
# additional stuff to put in its link command
2525
# SHLIB_EXPORTS (optional) Name of file containing list of symbols to
26-
# export
26+
# export, in the format "function_name number"
2727
#
2828
# When building a shared library, the following version information
2929
# must also be set. It should be omitted when building a dynamically
@@ -444,22 +444,22 @@ $(srcdir)/lib$(NAME)dll.def: $(SHLIB_EXPORTS)
444444
echo '; DEF file for MS VC++' >$@
445445
echo 'LIBRARY LIB$(UC_NAME)' >>$@
446446
echo 'EXPORTS' >>$@
447-
sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
447+
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
448448

449449
$(srcdir)/lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
450450
echo '; DEF file for MS VC++' >$@
451451
echo 'LIBRARY LIB$(UC_NAME)D' >>$@
452452
echo 'EXPORTS' >>$@
453-
sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
453+
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
454454

455455
$(srcdir)/blib$(NAME)dll.def: $(SHLIB_EXPORTS)
456456
echo '; DEF file for Borland C++ Builder' >$@
457457
echo 'LIBRARY BLIB$(UC_NAME)' >>$@
458458
echo 'EXPORTS' >>$@
459-
sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/' $< >>$@
459+
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ _\1@ \2/' $< >>$@
460460
echo >>$@
461461
echo '; Aliases for MS compatible names' >> $@
462-
sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/' $< | sed 's/ *$$//' >>$@
462+
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1= _\1/' $< | sed 's/ *$$//' >>$@
463463
endif # SHLIB_EXPORTS
464464

465465

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