msvc/winsock2 functions

Peter Kümmel syntheticpp at gmx.net
Tue Feb 14 23:05:24 CET 2006


Alexander Neundorf wrote:
> Hi,
> 
> On Tuesday 14 February 2006 21:14, Peter Kümmel wrote:
>> I've added the patched CheckTypeSize.cmake file
>> to cmake/modules which we should remove when there
>> is a new cmake release.
>>
>> The configure process now finds some importand stuff
>>
>> #define HAVE_STRUCT_ADDRINFO 1
>> #define HAVE_STRUCT_SOCKADDR_IN6 1
>> #define   HAVE_INET_PTON 1
>> #define   HAVE_INET_NTOP 1
>>
>> but checks for
>>
>> #define HAVE_GETHOSTNAME 1
>> #define HAVE_GETNAMEINFO 1
>>
>> still fail, so I've added the macros to sys/socket.h,
> 
> Why do they fail ?
> Check whether they succeed if check_symbol_exists() is used instead of 
> check_function_exists().
> 
> Bye
> Alex

Hi Alex,

Good idea, with the attached patch the tests are ok.

But I don't know if this breaks the unix tests.
Are the sysmbols on all systems in sys/socket.h
If not we could use a if.
Please let me know or commit it.

Peter


Index: ConfigureChecks.cmake
===================================================================
--- ConfigureChecks.cmake	(Revision 509494)
+++ ConfigureChecks.cmake	(Arbeitskopie)
@@ -195,8 +195,8 @@
 check_function_exists(gethostbyname2_r HAVE_GETHOSTBYNAME2_R)
 check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
 check_function_exists(gethostbyname_r HAVE_GETHOSTBYNAME_R)
-check_function_exists(gethostname HAVE_GETHOSTNAME)
-check_function_exists(getnameinfo HAVE_GETNAMEINFO)
+check_symbol_exists(gethostname sys/socket.h HAVE_GETHOSTNAME)
+check_symbol_exists(getnameinfo sys/socket.h HAVE_GETNAMEINFO)
 check_function_exists(getpagesize HAVE_GETPAGESIZE)
 check_function_exists(getpeereid  HAVE_GETPEEREID)
 check_function_exists(getpeername HAVE_GETPEERNAME)


More information about the Kde-buildsystem mailing list