mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Add gnetworking.h
Install a public "gnetworking.h" header that can be used to include the relevant OS-dependent networking headers. This does not really abstract away unix-vs-windows however; error codes, in particular, are incompatible. gnetworkingprivate.h now contains just a few internal URI-related functions Also add a g_networking_init() function to gnetworking.h, which can be used to explicitly initialize OS-level networking, rather than having that happen as a side-effect of registering GInetAddress. https://bugzilla.gnome.org/show_bug.cgi?id=623187
This commit is contained in:
20
configure.ac
20
configure.ac
@@ -1064,7 +1064,24 @@ if $glib_failed ; then
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex)
|
||||
AC_CHECK_HEADERS([netdb.h wspiapi.h arpa/nameser_compat.h])
|
||||
|
||||
# <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
|
||||
# inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if
|
||||
# they aren't present at run-time (on Windows 2000).
|
||||
AC_CHECK_HEADER([wspiapi.h], [WSPIAPI_INCLUDE="\#include <wspiapi.h>"])
|
||||
AC_SUBST(WSPIAPI_INCLUDE)
|
||||
|
||||
AC_MSG_CHECKING([if arpa/nameser_compat.h is needed])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arpa/nameser.h>],
|
||||
[int qclass = C_IN;])],
|
||||
[AC_MSG_RESULT([no])],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arpa/nameser.h>
|
||||
#include <arpa/nameser_compat.h>],
|
||||
[int qclass = C_IN;])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
NAMESER_COMPAT_INCLUDE="\#include <arpa/nameser_compat.h>"],
|
||||
[AC_MSG_ERROR([could not compile test program either way])])])
|
||||
AC_SUBST(NAMESER_COMPAT_INCLUDE)
|
||||
|
||||
AS_IF([test $glib_native_win32 = no], [
|
||||
# We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
|
||||
@@ -3618,6 +3635,7 @@ gthread/Makefile
|
||||
gio/Makefile
|
||||
gio/gdbus-2.0/codegen/Makefile
|
||||
gio/gdbus-2.0/codegen/config.py
|
||||
gio/gnetworking.h
|
||||
gio/xdgmime/Makefile
|
||||
gio/inotify/Makefile
|
||||
gio/kqueue/Makefile
|
||||
|
Reference in New Issue
Block a user