build: enable AppleIDN / WinIDN by default#13947
build: enable AppleIDN / WinIDN by default#13947vszakats wants to merge 16 commits intocurl:masterfrom
Conversation
|
Tests are unprepared to handle IDN with Windows, both UNICODE and non-UNICODE modes (but differently). |
|
Unexpected fallout with VS2008. Vista target, Normaliz.lib specified, yet the IDN functions are not found: Anybody with a solution for the above issue?
|
|
The VS2008 issue was reported here earlier: #1863 This trace message says that Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50021801/job/xpd1d5cor294gp3m#L42 It feels like something very obvious (or something very cryptic). Seeing the actual linker command would tell more of what's happening. |
a7e55a2 to
7463635
Compare
|
Backing off of this. It looks nearly hopeless to make IDN tests pass on Windows (without going crazies that is.) It needs passing Unicode text via the command-line for starters. Also the unexplained VC2008 fallout [FIXED]. Then autotools. I might cherry pick the part moving WINVER detection up to the top. [DONE → 919394e #14450] Feel free to pick up and continue. |
7cd2aab to
3c53042
Compare
3b1c273 to
efe750d
Compare
65d0620 to
4ff43bc
Compare
35bbf41 to
c558a30
Compare
c558a30 to
a21ef08
Compare
a21ef08 to
dc3cc6f
Compare
3b9e056 to
ee6474d
Compare
cmake: do not enable winidn in msvc 2008 and older with normaliz.lib linked, it fails to find the necessary symbols: ``` C:\projects\curl\_bld\lib\Release\libcurl_imp.exp >unity_0.obj : error LNK2019: unresolved external symbol __imp__IdnToAscii@20 referenced in function _win32_idn_to_ascii >unity_0.obj : error LNK2019: unresolved external symbol __imp__IdnToUnicode@20 referenced in function _win32_ascii_to_idn >C:\projects\curl\_bld\lib\libcurl.dll : fatal error LNK1120: 2 unresolved externals ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50374075 "VS2008 default SDK doesn't have IdnToAscii or IdnToUnicode in normaliz.lib" Ref: curl#1863 Ref: https://curl.se/mail/lib-2014-12/0084.html
ee6474d to
58f4070
Compare
Enable and use WinIDN and AppleIDN by default on these platforms,
if they can be used.
Compatibility warning: This change can make default builds incompatible
with Windows XP by default. WinIDN requires
Normaliz.dll. Windows XPisn't shipping with it and the necessary extra package is no longer
offered by Microsoft. Thus, for Windows XP compatibility, we recommend
building with
-DUSE_WIN32_IDN=OFF.Discussion: #13565
Closes #13947
Cleaner diff without whitespace changes: https://github.com/curl/curl/pull/13947/files?w=1
There are a few ways to resolve compatibility with existing builds
and also to handle interactions with the
USE_LIBIDN2option.This is an initial attempt.
TODO:
Downside: it makes the defaulting logic difficult to predict.
HAVE_WIN32_WINNT >= 0x0600, as cmake.HAVE_WIN32_WINNTand adjust defaultUSE_WIN32_IDNsetting accordingly?