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

Commit c68bff6

Browse files
committed
MinGW: Include .dll extension in .def file LIBRARY commands.
Newer toolchains append the extension implicitly if missing, but buildfarm member narwhal (gcc 3.4.2, ld 2.15.91 20040904) does not. This affects most core libraries having an exports.txt file, namely libpq and the ECPG support libraries. On Windows Server 2003, Windows API functions that load and unload DLLs internally will mistakenly unload a libpq whose DLL header reports "LIBPQ" instead of "LIBPQ.dll". When, subsequently, control would return to libpq, the backend crashes. Back-patch to 9.4, like commit 846e91e. Before that commit, we used a different linking technique that yielded "libpq.dll" in the DLL header. Commit 53566fc worked around this by eliminating a call to a function that loads and unloads DLLs internally. That commit is no longer necessary for correctness, but its improving consistency with the MSVC build remains valid.
1 parent 89fbe97 commit c68bff6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Makefile.shlib

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,13 @@ UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMN
427427

428428
lib$(NAME)dll.def: $(SHLIB_EXPORTS)
429429
echo '; DEF file for MS VC++' >$@
430-
echo 'LIBRARY LIB$(UC_NAME)' >>$@
430+
echo 'LIBRARY LIB$(UC_NAME).dll' >>$@
431431
echo 'EXPORTS' >>$@
432432
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
433433

434434
lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
435435
echo '; DEF file for MS VC++' >$@
436-
echo 'LIBRARY LIB$(UC_NAME)D' >>$@
436+
echo 'LIBRARY LIB$(UC_NAME)D.dll' >>$@
437437
echo 'EXPORTS' >>$@
438438
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
439439

0 commit comments

Comments
 (0)