KDE/kdelibs

Peter Kümmel syntheticpp at yahoo.com
Thu Feb 16 13:29:40 CET 2006


SVN commit 510104 by kuemmel:

find network functions on windows, netsupp_win32.cpp is obsolete
CCMAIL:kde-buildsystem at kde.org


 M  +4 -3      ConfigureChecks.cmake  
 M  +2 -1      kdecore/CMakeLists.txt  
 M  +12 -0     kdecore/netsupp_win32.cpp  
 M  +2 -1      kdecore/network/kresolverstandardworkers.cpp  
 M  +8 -1      win/include/mingw/netdb.h  
 M  +1 -1      win/include/mingw/sys/socket.h  
 M  +7 -1      win/include/msvc/netdb.h  


--- trunk/KDE/kdelibs/ConfigureChecks.cmake #510103:510104
@@ -179,7 +179,11 @@
 check_symbol_exists(res_init        "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT)
 check_symbol_exists(gethostname     "unistd.h"                 HAVE_GETHOSTNAME)
 check_symbol_exists(getnameinfo     "sys/socket.h;netdb.h"     HAVE_GETNAMEINFO)
+check_symbol_exists(freeaddrinfo    "sys/socket.h;netdb.h"     HAVE_FREEADDRINFO)
+check_symbol_exists(getaddrinfo     "sys/socket.h;netdb.h"     HAVE_GETADDRINFO)
+check_symbol_exists(gai_strerror    "netdb.h"                  HAVE_GAI_STRERROR)
 
+
 check_function_exists(posix_fadvise  HAVE_FADVISE)
 check_function_exists(index     HAVE_INDEX)
 check_function_exists(rindex    HAVE_RINDEX)
@@ -188,8 +192,6 @@
 check_function_exists(backtrace HAVE_BACKTRACE)
 check_function_exists(getservbyname_r HAVE_DECL_GETSERVBYNAME_R)
 check_function_exists(getservbyname_r HAVE_GETSERVBYNAME_R)
-check_function_exists(freeaddrinfo HAVE_FREEADDRINFO)
-check_function_exists(gai_strerror HAVE_GAI_STRERROR)
 check_function_exists(getcwd    HAVE_GETCWD)
 check_function_exists(getgroups HAVE_GETGROUPS)
 check_function_exists(getcwd    HAVE_GETCWD)
@@ -254,7 +256,6 @@
 check_function_exists(shl_load HAVE_SHL_LOAD)
 check_function_exists(dld_init HAVE_DLD)
 
-check_function_exists(getaddrinfo HAVE_GETADDRINFO)
 check_function_exists(getmntinfo HAVE_GETMNTINFO)
 check_function_exists(inet_pton  HAVE_INET_PTON)
 check_function_exists(inet_ntop  HAVE_INET_NTOP)
--- trunk/KDE/kdelibs/kdecore/CMakeLists.txt #510103:510104
@@ -42,7 +42,8 @@
       kapplication_win.cpp 
       kglobalaccel_win.cpp
       ktoolinvocation_win.cpp 
-      netsupp_win32.cpp )
+      #netsupp_win32.cpp is obsolete
+      )
 endif (WIN32)
 
 
--- trunk/KDE/kdelibs/kdecore/netsupp_win32.cpp #510103:510104
@@ -21,6 +21,18 @@
  **/
 
 
+/////////////////////////////////////////
+//      This file is obsolete!
+//
+int i[-1]; 
+//
+// All functions are now in kdewin32
+// or already defined in winsock2.h/ws2tcpip.h
+/////////////////////////////////////////
+
+
+
+
 #include "netsupp.h"
 
 KDECORE_EXPORT void kde_freeaddrinfo(struct kde_addrinfo *ai)
--- trunk/KDE/kdelibs/kdecore/network/kresolverstandardworkers.cpp #510103:510104
@@ -495,10 +495,11 @@
 		results.setError(KResolver::Memory);
 		break;
 
+#ifdef EAI_SYSTEM // not available on windows
 	      case EAI_SYSTEM:
 		results.setError(KResolver::SystemError, errno);
 		break;
-
+#endif
 	      default:
 		results.setError(KResolver::UnknownError, errno);
 		break;
--- trunk/KDE/kdelibs/win/include/mingw/netdb.h #510103:510104
@@ -17,5 +17,12 @@
    Boston, MA 02110-1301, USA.
 */
 
-/* empty for now, to avoid #ifdefs */
+#ifndef KDEWIN_NETDB_H
+#define KDEWIN_NETDB_H
 
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+
+#endif 
+
--- trunk/KDE/kdelibs/win/include/mingw/sys/socket.h #510103:510104
@@ -23,8 +23,8 @@
 #include <sys/time.h>
 
 #include <winsock2.h>
+#include <ws2tcpip.h>
 
-
 #ifndef socklen_t
 #define socklen_t int
 #endif
--- trunk/KDE/kdelibs/win/include/msvc/netdb.h #510103:510104
@@ -17,5 +17,11 @@
    Boston, MA 02110-1301, USA.
 */
 
-/* empty for now, to avoid #ifdefs */
+#ifndef KDEWIN_NETDB_H
+#define KDEWIN_NETDB_H
 
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include "fixwinh.h"
+
+#endif 


More information about the Kde-buildsystem mailing list