• Noah Misch's avatar
    MinGW: Include .dll extension in .def file LIBRARY commands. · c0e19036
    Noah Misch authored
    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 846e91e0.
    Before that commit, we used a different linking technique that yielded
    "libpq.dll" in the DLL header.
    
    Commit 53566fc0 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.
    c0e19036
Makefile.shlib 15.6 KB