summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-08-27 17:55:53 +0000
committerTom Lane2009-08-27 17:55:53 +0000
commit1c13e3cd70acbe10e726c58f097ee1672177915a (patch)
tree065bb938288afbd62a731c7992e95e175598d733
parent1d4ac92b1ff41b61f862d44cc29c18ab0d3ade6c (diff)
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.
-rw-r--r--src/Makefile.shlib10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 3df31bece9..df65ad6f21 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -23,7 +23,7 @@
# SHLIB_LINK If shared library relies on other libraries,
# additional stuff to put in its link command
# SHLIB_EXPORTS (optional) Name of file containing list of symbols to
-# export
+# export, in the format "function_name number"
#
# When building a shared library, the following version information
# must also be set. It should be omitted when building a dynamically
@@ -444,22 +444,22 @@ $(srcdir)/lib$(NAME)dll.def: $(SHLIB_EXPORTS)
echo '; DEF file for MS VC++' >$@
echo 'LIBRARY LIB$(UC_NAME)' >>$@
echo 'EXPORTS' >>$@
- sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
+ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
$(srcdir)/lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
echo '; DEF file for MS VC++' >$@
echo 'LIBRARY LIB$(UC_NAME)D' >>$@
echo 'EXPORTS' >>$@
- sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
+ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
$(srcdir)/blib$(NAME)dll.def: $(SHLIB_EXPORTS)
echo '; DEF file for Borland C++ Builder' >$@
echo 'LIBRARY BLIB$(UC_NAME)' >>$@
echo 'EXPORTS' >>$@
- sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/' $< >>$@
+ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ _\1@ \2/' $< >>$@
echo >>$@
echo '; Aliases for MS compatible names' >> $@
- sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/' $< | sed 's/ *$$//' >>$@
+ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1= _\1/' $< | sed 's/ *$$//' >>$@
endif # SHLIB_EXPORTS