mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +03:00
patch for socklen_t detection by Albert Chin-A-Young <china@thewrittenword.com>
Daniel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Thu Oct 12 01:37:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
|
* config.h.in configure.in nanoftp.c nanohttp.c xmlversion.h.in :
|
||||||
|
patch for socklen_t detection by
|
||||||
|
Albert Chin-A-Young <china@thewrittenword.com>
|
||||||
|
|
||||||
Wed Oct 11 17:53:57 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
Wed Oct 11 17:53:57 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* tree.c valid.c xmllint.c: Fixed a few postvalidation bugs
|
* tree.c valid.c xmllint.c: Fixed a few postvalidation bugs
|
||||||
|
@ -153,3 +153,5 @@
|
|||||||
/* Define if compiler has function prototypes */
|
/* Define if compiler has function prototypes */
|
||||||
#undef PROTOTYPES
|
#undef PROTOTYPES
|
||||||
|
|
||||||
|
/* Type of socket length (socklen_t) */
|
||||||
|
#undef SOCKLEN_T
|
||||||
|
34
configure.in
34
configure.in
@ -87,7 +87,8 @@ fi
|
|||||||
|
|
||||||
AC_SUBST(HTML_DIR)
|
AC_SUBST(HTML_DIR)
|
||||||
|
|
||||||
AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)])
|
AC_ARG_ENABLE(corba,
|
||||||
|
[ --enable-corba Add Corba support (default)])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Corba is enabled by default
|
dnl Corba is enabled by default
|
||||||
@ -108,6 +109,32 @@ AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
|
|||||||
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
|
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
|
||||||
AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
|
AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
|
||||||
|
|
||||||
|
dnl Determine what socket length (socklen_t) data type is
|
||||||
|
AC_MSG_CHECKING([for type of socket length (socklen_t)])
|
||||||
|
AC_TRY_COMPILE2([
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>],[
|
||||||
|
(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
|
||||||
|
AC_MSG_RESULT(socklen_t *)
|
||||||
|
SOCKLEN_T=socklen_t],[
|
||||||
|
AC_TRY_COMPILE2([
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>],[
|
||||||
|
(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
|
||||||
|
AC_MSG_RESULT(size_t *)
|
||||||
|
SOCKLEN_T=size_t],[
|
||||||
|
AC_TRY_COMPILE2([
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>],[
|
||||||
|
(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
|
||||||
|
AC_MSG_RESULT(int *)
|
||||||
|
SOCKLEN_T=int],[
|
||||||
|
AC_MSG_WARN(could not determine)])])])
|
||||||
|
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T)
|
||||||
|
|
||||||
dnl Checks for isnan in libm if not in libc
|
dnl Checks for isnan in libm if not in libc
|
||||||
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
|
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
|
||||||
[M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
|
[M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
|
||||||
@ -135,13 +162,14 @@ if test "${GCC}" != "yes" ; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
case $host in
|
case ${host} in
|
||||||
*-*-solaris*)
|
*-*-solaris*)
|
||||||
XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
|
XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Use buffers for content
|
dnl Use buffers for content
|
||||||
dnl
|
dnl
|
||||||
|
@ -22,16 +22,6 @@ extern void xmlCheckVersion(int version);
|
|||||||
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
|
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
|
||||||
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
|
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
|
||||||
|
|
||||||
/*
|
|
||||||
* a few extra config stuff which may not be handled easily in configure
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HAVE_SOCKLEN_T
|
|
||||||
#if defined(__osf__) || defined(__Linux__)
|
|
||||||
#define HAVE_SOCKLEN_T
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Whether the FTP support is configured in
|
* Whether the FTP support is configured in
|
||||||
*/
|
*/
|
||||||
|
@ -1244,11 +1244,7 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||||||
unsigned char ad[6], *adp, *portp;
|
unsigned char ad[6], *adp, *portp;
|
||||||
unsigned int temp[6];
|
unsigned int temp[6];
|
||||||
struct sockaddr_in dataAddr;
|
struct sockaddr_in dataAddr;
|
||||||
#ifdef HAVE_SOCKLEN_T
|
SOCKLEN_T dataAddrLen;
|
||||||
socklen_t dataAddrLen;
|
|
||||||
#else
|
|
||||||
unsigned int dataAddrLen;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ctxt->dataFd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
ctxt->dataFd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||||
if (ctxt->dataFd < 0) {
|
if (ctxt->dataFd < 0) {
|
||||||
|
@ -678,11 +678,7 @@ xmlNanoHTTPConnectAttempt(struct in_addr ia, int port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( FD_ISSET(s, &wfd) ) {
|
if ( FD_ISSET(s, &wfd) ) {
|
||||||
#ifdef HAVE_SOCKLEN_T
|
SOCKLEN_T len;
|
||||||
socklen_t len;
|
|
||||||
#else
|
|
||||||
unsigned int len;
|
|
||||||
#endif
|
|
||||||
len = sizeof(status);
|
len = sizeof(status);
|
||||||
if (getsockopt(s, SOL_SOCKET, SO_ERROR, &status, &len) < 0 ) {
|
if (getsockopt(s, SOL_SOCKET, SO_ERROR, &status, &len) < 0 ) {
|
||||||
/* Solaris error code */
|
/* Solaris error code */
|
||||||
|
@ -22,16 +22,6 @@ extern void xmlCheckVersion(int version);
|
|||||||
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
|
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
|
||||||
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
|
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
|
||||||
|
|
||||||
/*
|
|
||||||
* a few extra config stuff which may not be handled easily in configure
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HAVE_SOCKLEN_T
|
|
||||||
#if defined(__osf__) || defined(__Linux__)
|
|
||||||
#define HAVE_SOCKLEN_T
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Whether the FTP support is configured in
|
* Whether the FTP support is configured in
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user