summaryrefslogtreecommitdiff
path: root/utils/config.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-17 13:42:28 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-17 13:42:28 +0100
commitade0cd8bb95ce20b520cb3b13600d04130f52976 (patch)
treedf5bb0c1cdbf00d2c01a07358ac05574c0a1aec8 /utils/config.h
parent810e9153d1b4d9ed8e208eece4ee88b0d3867ec0 (diff)
downloadnetsurf-ade0cd8bb95ce20b520cb3b13600d04130f52976.tar.gz
netsurf-ade0cd8bb95ce20b520cb3b13600d04130f52976.tar.bz2
Reduce unecessary use of networking headers
The utility configuration header dragged in a number of bsd sockets and related API as a side effect of setting up the configuration. By splitting the header and API setup into a separate header only the small number of places that need the functionality explitly include it.
Diffstat (limited to 'utils/config.h')
-rw-r--r--utils/config.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/utils/config.h b/utils/config.h
index 53614680b..8f05b23dc 100644
--- a/utils/config.h
+++ b/utils/config.h
@@ -61,24 +61,16 @@ char *strchrnul(const char *s, int c);
#define HAVE_SYS_SELECT
#define HAVE_INETATON
+#define HAVE_POSIX_INET_HEADERS
#if (defined(_WIN32))
#undef HAVE_INETATON
#undef HAVE_SYS_SELECT
-#include <winsock2.h>
-#ifndef EAFNOSUPPORT
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#endif
-int inet_aton(const char *cp, struct in_addr *inp);
-#else
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/select.h>
+#undef HAVE_POSIX_INET_HEADERS
#endif
#define HAVE_INETPTON
#if (defined(_WIN32))
#undef HAVE_INETPTON
-int inet_pton(int af, const char *src, void *dst);
#endif
#define HAVE_UTSNAME