KDE/kdelibs

Peter Kümmel syntheticpp at gmx.net
Thu Feb 16 21:02:32 CET 2006


Paulo Jorge Guedes wrote:
>> -----Original Message-----
>> From: Paulo Jorge Guedes [mailto:Paulo.Guedes at artelecom.pt]
>> Sent: quinta-feira, 16 de Fevereiro de 2006 17:40
>> To: kde-buildsystem at kde.org
>> Subject: RE: KDE/kdelibs
> 
>>>> Can you check if you have getaddrinfo and getnameinfo in your
> system?
>>> I don't have any. This fails:
>>>
>>> #if (_WIN32_WINNT >= 0x0501)
>> For Windows XP it should be:
>>
>> _WIN32_WINNT>=0x0501
>> WINVER>=0x0501
>>
>> I'm getting 1024 for both.
>>
>> So, I guess we need to include netsupp.cpp (which doesn't compile btw)
>> also on win32 as there is a chance this functions are not available.
> 
> Well, on windef.h:11:
> 
> #ifndef WINVER
> #define WINVER 0x0400
> /*
>  * If you need Win32 API features newer the Win95 and WinNT then you
> must
>  * define WINVER before including windows.h or any other method of
> including
>  * the windef.h header.
>  */
> #endif
> #ifndef _WIN32_WINNT
> #define _WIN32_WINNT WINVER
> 
> Now, the question is, what is the best way to workaround this?
> 
> Paulo

I've tested it with mingw 3.4.2, and here are no problems
finding getaddrinfo:
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found

To test just for getaddrinfo:
(I think you know all the steps, I just wanna be sure)

1. rm CMakeCache.txt
2. cmake -G"MinGW Makefiles" ../kdelibs/win
3. make
4. make install
5. rm CMakeCache.txt
6. cmake -G"MinGW Makefiles" ../kdelibs

now there is a config.h in there folder, delete the line below
//Have symbol getaddrinfo
and run 6. again, so you can test on getaddrinfo only.


The detecting of getaddrinfo should be independent of _WIN32_WINNT and WINVER,
because it is defined in ws2tcpip.h (the version of your mingw installation)
and there are now (at least here) #ifdefs.

Peter


More information about the Kde-buildsystem mailing list