cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compiling under windows with USE_IDN=yes, patch needed

From: Jan Ehrhardt <phpdev_at_ehrhardt.nl>
Date: Sat, 28 Jul 2012 12:58:00 +0200

Gisle Vanem in gmane.comp.web.curl.library (Sat, 28 Jul 2012 11:52:10
+0200):
>"Jan Ehrhardt" <phpdev_at_ehrhardt.nl> wrote:
>
>> I commented out the four lines starting with #ifdef WANT_IDN_PROTOTYPES
>> in idn_win32.src and added the line #include <winnls.h> at the same
>> place. Result: the unresolved symbols are back again.
>
>That's because WINVER isn't set high enough. Look closely in <WinNls.h>.
>IdnToAscii etc. are inside "WINVER>=0x0600". I.e. they are available on
>Win-Vista+ only.
>
>But my MingW on Win-XP seems to put the functions in the imp-lib
>libkernel32.a, but they are really implemented in the system's normaliz.dll.
>
>So this fuzz can lead to problems; if someone builds libcurl.dll on Win-Vista
>and distributes it to people using Win-XP, we'll get complains. A fix would
>be to dynamically load normaliz.dll and use GetProcAdress().

The way it is implemented now normaliz.lib is not included in libcurl,
but only referred to. The systems normaliz.dll will be used.
This is exactly the desired result.

>v6.0A is pretty old. I have v7.1 which is updated for Win-7. And
>it works perfectly allthough I only have Win-XP. You should get
>rid of those old and outdated SDK-headers.

It is the standard SDK for VC2008 (VC9). I compile PHP myself (PHP
5.3.15 and PHP 5.4.5 under X86 and X64) and would rather not mess with
the SDK's. Of course, I have 7.1 (x64) and v7.0a (x86) installed as
well, but these are the standard SDK's for VC2010 (VC10). And PHP is
VC9...

> Maybe my envtool [1]
>program to check the %INCLUDE-path can help you? Here:
> c:\> envtool --inc winnls.h
>
>30 Sep 2009 - 20:27:20: g:\VC_2010\SDK\include\WinNls.h
>11 Jul 1998 - 20:16:40: g:\VC_2010\DDK\inc\WINNLS.H
>
>[1] http://home.broadpark.no/~gvanem/misc/envtool.zip

Thanks. Might come in handy.

Jan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-28