gnetworking.h.in: move "#undef interface"
authorDan Winship <danw@gnome.org>
Sun, 2 Nov 2014 14:36:14 +0000 (09:36 -0500)
committerDan Winship <danw@gnome.org>
Sun, 2 Nov 2014 14:36:14 +0000 (09:36 -0500)
The win32 headers do:

  #define interface struct

which is just evil and breaks other code that assumes it can use
"interface" as a variable name. gnetworking.h was supposed to be doing
"#undef interface" after including the win headers, but it did it too
soon, resulting in it getting redefined by a later include. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=738551

gio/gnetworking.h.in

index 0b7a4dd..0bb21c3 100644 (file)
 #define _WIN32_WINNT 0x0501
 #endif
 #include <winsock2.h>
-#undef interface
 #include <ws2tcpip.h>
 #include <windns.h>
 #include <mswsock.h>
 @WSPIAPI_INCLUDE@
 #include <iphlpapi.h>
+#undef interface
 
 #else /* !G_OS_WIN32 */