]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-sysdeps-win: don't include wspiapi.h
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 2 Sep 2013 16:39:37 +0000 (17:39 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 16 Sep 2013 11:35:35 +0000 (12:35 +0100)
This block provoked a warning on mingw-w64 because we were redefining
_inline. According to Ralf's research, it was introduced in 452ff68a:
Windows 2000 doesn't have getaddrinfo and related functions in
ws2tcpip.h, but does have a shim implementation in wspiapi.h.

At the time of 452ff68a, mingw32 didn't have wspiapi.h, so it's unclear
why there was a __GNUC__ code path here. The "#define _inline" on that
code path looks likely to be some sort of workaround for a faulty version
of wspiapi.h? Current mingw-w64 does have wspiapi.h, so we enter the
__GNUC__ code path and get the redefinition.

dbus no longer supports Windows 2000, so we no longer need wspiapi.h
at all, and can rely on XP or later. (Ralf's policy is to only support
versions of Windows that are still supported by Microsoft, and Windows 2000
reached the end of its life-cycle in 2010.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker
cmake/ConfigureChecks.cmake
cmake/config.h.cmake
configure.ac
dbus/dbus-sysdeps-win.c

index 33a9cee298f41dca7fa7f2ab9531ea29c2716051..477047260e04e161908732a8d39ffe35496cc0ee 100644 (file)
@@ -11,7 +11,6 @@ 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
 check_include_file(sys/syslimits.h    HAVE_SYS_SYSLIMITS_H)   # dbus-sysdeps-unix.c
index f14b169e57e35b200e129837397c8907525c9475..d6ea64f20349bc2f509163c6670f3f6e57b477a1 100644 (file)
 /* 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
-
 /* Define to 1 if you have unistd.h */
 #cmakedefine   HAVE_UNISTD_H 1
 
index da4ab5fb91438ddda8800e83b80c8fd2557ad963..f201b5b149eabe86a0b6fc930c9d86794c7a9f0e 100644 (file)
@@ -699,8 +699,6 @@ AC_CHECK_HEADERS(unistd.h)
 
 AC_CHECK_HEADERS(ws2tcpip.h)
 
-AC_CHECK_HEADERS(wspiapi.h)
-
 AC_CHECK_HEADERS(alloca.h)
 
 # Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
index a77e5b58d4443580629c0b7d6039865adab7e1bb..1c974c504d9bfb32fa5fabb0b66aeb69281f7a1e 100644 (file)
@@ -77,16 +77,6 @@ extern BOOL WINAPI ConvertSidToStringSidA (PSID Sid, LPSTR *StringSid);
 #include <ws2tcpip.h>
 #endif
 
-#ifdef HAVE_WSPIAPI_H
-// needed for w2k compatibility (getaddrinfo/freeaddrinfo/getnameinfo)
-#ifdef __GNUC__
-#define _inline
-#include "wspiapi.h"
-#else
-#include <wspiapi.h>
-#endif
-#endif // HAVE_WSPIAPI_H
-
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif