Fix warnings on Windows CE target.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Wed, 14 Apr 2010 01:20:44 +0000 (03:20 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Wed, 14 Apr 2010 06:26:47 +0000 (08:26 +0200)
cmake/ConfigureChecks.cmake
cmake/config.h.cmake
configure.in
dbus/dbus-sysdeps-win.c
dbus/dbus-sysdeps-wince-glue.h

index 5c405a87f56502d33d9b4fb85b62f041cb2f9f37..4b9fbd15414f8cc05e620ac9f213956d52622fc5 100644 (file)
@@ -10,6 +10,7 @@ check_include_file(sys/poll.h   HAVE_POLL)      # dbus-sysdeps.c, dbus-sysdeps-w
 check_include_file(sys/time.h   HAVE_SYS_TIME_H)# dbus-sysdeps-win.c
 check_include_file(sys/wait.h   HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c
 check_include_file(time.h       HAVE_TIME_H)    # dbus-sysdeps-win.c
+check_include_file(ws2tcpip.h   HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c
 check_include_file(wspiapi.h    HAVE_WSPIAPI_H) # dbus-sysdeps-win.c
 check_include_file(unistd.h     HAVE_UNISTD_H)  # dbus-sysdeps-util-win.c
 check_include_file(stdio.h      HAVE_STDIO_H)   # dbus-sysdeps.h
index 9083eb4b73e2c29eb31700ddd54fd3da114ee45c..072dbdf4e2b79c85fc650b87873299aff20305a1 100644 (file)
 /* Define to 1 if you have time.h */
 #cmakedefine   HAVE_TIME_H 1
 
+/* Define to 1 if you have ws2tcpip.h */
+#cmakedefine   HAVE_WS2TCPIP_H
+
 /* Define to 1 if you have wspiapi.h */
 #cmakedefine   HAVE_WSPIAPI_H 1
 
index 83ef91dcd00c391d640b466294f723b146003b4a..74f6f5e752bee9134c1d2ab014a0fff47feb0e5b 100644 (file)
@@ -532,6 +532,8 @@ AC_CHECK_HEADERS(byteswap.h)
 
 AC_CHECK_HEADERS(unistd.h)
 
+AC_CHECK_HEADERS(ws2tcpip.h)
+
 AC_CHECK_HEADERS(wspiapi.h)
 
 # Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
index bcb9c824f7ec64fc2d4498c18fbd8e33abded863..16c6f696f3b278c9ef9576e11c8b987da1733df4 100644 (file)
@@ -69,6 +69,11 @@ extern BOOL WINAPI ConvertSidToStringSidA (PSID Sid, LPSTR *StringSid);
 #include <sys/types.h>
 #endif
 
+#ifdef HAVE_WS2TCPIP_H
+/* getaddrinfo for Windows CE (and Windows).  */
+#include <ws2tcpip.h>
+#endif
+
 #ifdef HAVE_WSPIAPI_H
 // needed for w2k compatibility (getaddrinfo/freeaddrinfo/getnameinfo)
 #ifdef __GNUC__
index 47f13da0d14d4f20be1d4ba6a47513018a8322cd..6d8e3b1e86507922f9641421d2dfd04617976602 100644 (file)
@@ -28,6 +28,8 @@
 #include <time.h>
 #include <stdarg.h>
 
+/* For getaddrinfo.  */
+#define _WIN32_WCE 0x0401 
 #include <windows.h>
 #undef interface
 
@@ -46,7 +48,7 @@ BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
 
 /* Seriously.  Windows CE does not have errno.  Don't you hate it when
    that happens?  */
-#define errno (GetLastError ())
+#define errno ((int)GetLastError ())
 
 #define ENOENT          ERROR_FILE_NOT_FOUND
 #define EMFILE          ERROR_TOO_MANY_OPEN_FILES