mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-25 23:21:26 +03:00
build: Don't check for standard POSIX headers
These headers should be available since early POSIX days and are required no matter what.
This commit is contained in:
parent
d7dc2eaf06
commit
cc03c069f5
@ -152,12 +152,7 @@ if(LIBXML2_WITH_READLINE)
|
||||
endif()
|
||||
|
||||
if(LIBXML2_WITH_HTTP)
|
||||
check_include_files(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_include_files(netdb.h HAVE_NETDB_H)
|
||||
check_include_files(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_files(poll.h HAVE_POLL_H)
|
||||
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
endif()
|
||||
|
||||
if(LIBXML2_WITH_TLS)
|
||||
|
@ -1,6 +1,3 @@
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#cmakedefine HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the declaration of 'getentropy', and to 0 if you
|
||||
don't. */
|
||||
#cmakedefine01 HAVE_DECL_GETENTROPY
|
||||
@ -21,12 +18,6 @@
|
||||
/* Define if readline library is there (-lreadline) */
|
||||
#cmakedefine HAVE_LIBREADLINE 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#cmakedefine HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#cmakedefine HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
|
||||
@ -39,15 +30,6 @@
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#cmakedefine HAVE_ZLIB_H 1
|
||||
|
||||
/* Version number of package */
|
||||
#cmakedefine VERSION "@VERSION@"
|
||||
|
||||
|
@ -309,8 +309,7 @@ dnl
|
||||
dnl Checks for inet libraries
|
||||
dnl
|
||||
if test "$with_http" = "yes"; then
|
||||
AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h netdb.h])
|
||||
AC_CHECK_HEADERS([sys/select.h poll.h])
|
||||
AC_CHECK_HEADERS([poll.h])
|
||||
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
|
@ -235,12 +235,6 @@ config_h.set_quoted('LOCALEDIR', dir_locale)
|
||||
xml_check_headers = [
|
||||
[ 'stdint.h', true ],
|
||||
[ 'glob.h', true ],
|
||||
|
||||
[ 'sys/socket.h', want_http ],
|
||||
[ 'netinet/in.h', want_http ],
|
||||
[ 'arpa/inet.h', want_http ],
|
||||
[ 'netdb.h', want_http ],
|
||||
[ 'sys/select.h', want_http ],
|
||||
[ 'poll.h', want_http ],
|
||||
]
|
||||
|
||||
|
41
nanohttp.c
41
nanohttp.c
@ -30,38 +30,21 @@
|
||||
|
||||
#else /* _WIN32 */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#ifndef SUPPORT_IP6
|
||||
#define SUPPORT_IP6
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_POLL_H
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <poll.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#include <stropts>
|
||||
#define XML_SOCKLEN_T unsigned int
|
||||
#else
|
||||
#define XML_SOCKLEN_T socklen_t
|
||||
#endif
|
||||
/* This can be disabled if you don't have getaddrinfo */
|
||||
#define SUPPORT_IP6
|
||||
#define XML_SOCKLEN_T socklen_t
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@ -1060,7 +1043,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
|
||||
* extraction code. it work on Linux, if it work on your platform
|
||||
* and one want to enable it, send me the defined(foobar) needed
|
||||
*/
|
||||
#if defined(HAVE_NETDB_H) && defined(HOST_NOT_FOUND) && defined(__linux__)
|
||||
#if defined(HOST_NOT_FOUND) && defined(__linux__)
|
||||
const char *h_err_txt = "";
|
||||
|
||||
switch (h_errno) {
|
||||
|
Loading…
Reference in New Issue
Block a user