add LoadLibrary("winhttp.dll")-fix GCC 8.3.0 link fail in blead perl #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiling blead perl 5.41 with GCC 8.3.0 i686, Win32.xs has a link failure breaking blead.
C:/Strawberry/c/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw 32/bin/ld.exe: C:\sources\perl5\cpan\Win32/Win32.xs:1880: undefined reference to `WinHttpQueryHeaders@24'
Switch to loading winhttp.dll on demand with GetProcAddrees, not static DLL linking. Plus winhttp.dll has a huge tree of sub-dependency DLLs to many other MS WinOS DLLs. Most Win32.pm users and most perl.exe processes instances will never call Win32::HttpGetFile. Win32::HttpGetFile is a great feature, but it will never have the usage demand of Win32::GetLastError() for example, so load it on demand.
Fixing the GCC link failure is most important. This patch minimalistic to get blead perl+GCC to compile. I see other cleanup that can be done but this patch is minimalistic. Reference count the DLL Library handle for ithread reasons and libperl unloads.