From: Dan Winship Date: Fri, 19 Apr 2013 13:57:34 +0000 (-0400) Subject: Fix build on Windows, deprecate soup-portability.h X-Git-Tag: upstream/2.46.0~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b00583aabca2c7200189c8e40f34dda819c3e80;p=platform%2Fupstream%2Flibsoup.git Fix build on Windows, deprecate soup-portability.h soup-portability.h created portability problems (ha!) because the windows headers do "#define interface struct", conflicting with variable names elsewhere. The only thing that needed soup-portability.h in the public headers was soup-address.h, which uses struct sockaddr. But we can just do a forward declaration of that type rather than actually pulling in the headers. Then soup-address.h can stop including soup-portability.h, and we can use gio/gnetworking.h in the handful of other places that need networking-related includes. This may possibly break some other modules that depended on implicitly getting network includes as a side effect of including soup.h... https://bugzilla.gnome.org/show_bug.cgi?id=692134 --- diff --git a/libsoup/soup-address.c b/libsoup/soup-address.c index 286be8c..da4da94 100644 --- a/libsoup/soup-address.c +++ b/libsoup/soup-address.c @@ -11,6 +11,8 @@ #include +#include + #include "soup-address.h" #include "soup.h" #include "soup-marshal.h" diff --git a/libsoup/soup-address.h b/libsoup/soup-address.h index dd4c275..797a550 100644 --- a/libsoup/soup-address.h +++ b/libsoup/soup-address.h @@ -8,7 +8,6 @@ #include -#include #include G_BEGIN_DECLS @@ -51,6 +50,8 @@ typedef enum { #define SOUP_ADDRESS_ANY_PORT 0 +struct sockaddr; + typedef void (*SoupAddressCallback) (SoupAddress *addr, guint status, gpointer user_data); diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c index 4268429..9e4de13 100644 --- a/libsoup/soup-socket.c +++ b/libsoup/soup-socket.c @@ -11,6 +11,8 @@ #include +#include + #include "soup-socket.h" #include "soup.h" #include "soup-filter-input-stream.h" diff --git a/tests/connection-test.c b/tests/connection-test.c index 1a8c51a..cdc4cce 100644 --- a/tests/connection-test.c +++ b/tests/connection-test.c @@ -5,6 +5,8 @@ #include "test-utils.h" +#include + SoupServer *server; SoupURI *base_uri; GMutex server_mutex; diff --git a/tests/socket-test.c b/tests/socket-test.c index 60c3e86..42ab6c8 100644 --- a/tests/socket-test.c +++ b/tests/socket-test.c @@ -4,12 +4,10 @@ * Copyright 2012 Nokia Corporation */ -#include - -#include - #include "test-utils.h" +#include + static void do_unconnected_socket_test (void) {