Commit c284c64f authored by Daniel Veillard's avatar Daniel Veillard

use XML_SOCKLEN_T instead of SOCKLEN_T since apparently IBM can't avoid

* config.h.in configure.in nanoftp.c nanohttp.c xmllint.c
  macos/src/config-mac.h: use XML_SOCKLEN_T instead of SOCKLEN_T
  since apparently IBM can't avoid breaking common defines #166922
Daniel
parent 394902e0
Thu Mar 31 12:22:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
* config.h.in configure.in nanoftp.c nanohttp.c xmllint.c
macos/src/config-mac.h: use XML_SOCKLEN_T instead of SOCKLEN_T
since apparently IBM can't avoid breaking common defines #166922
Thu Mar 31 10:41:45 CEST 2005 Daniel Veillard <daniel@veillard.com>
* encoding.c: fix unitinialized variable in not frequently used
......
......@@ -273,9 +273,6 @@
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Determine what socket length (socklen_t) data type is */
#undef SOCKLEN_T
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
......@@ -285,6 +282,9 @@
/* Version number of package */
#undef VERSION
/* Determine what socket length (socklen_t) data type is */
#undef XML_SOCKLEN_T
/* Using the Win32 Socket implementation */
#undef _WINSOCKAPI_
......
......@@ -419,24 +419,24 @@ AC_TRY_COMPILE2([
#include <sys/socket.h>],[
(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
AC_MSG_RESULT(socklen_t *)
SOCKLEN_T=socklen_t],[
XML_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],[
XML_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],[
XML_SOCKLEN_T=int],[
AC_MSG_WARN(could not determine)
SOCKLEN_T="int"])])])
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
XML_SOCKLEN_T="int"])])])
AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
dnl ***********************Checking for availability of IPv6*******************
......
......@@ -16,7 +16,7 @@
#undef HAVE_LIBHISTORY
#undef HAVE_LIBREADLINE
#define SOCKLEN_T socklen_t
#define XML_SOCKLEN_T socklen_t
#define HAVE_LIBPTHREAD
#define HAVE_PTHREAD_H
#define LIBXML_THREAD_ENABLED
......
......@@ -81,8 +81,8 @@
#define _WINSOCKAPI_
#include <wsockcompat.h>
#include <winsock2.h>
#undef SOCKLEN_T
#define SOCKLEN_T unsigned int
#undef XML_SOCKLEN_T
#define XML_SOCKLEN_T unsigned int
#endif
/**
......@@ -95,7 +95,7 @@
#define SOCKET int
#endif
#if defined(VMS) || defined(__VMS)
#define SOCKLEN_T unsigned int
#define XML_SOCKLEN_T unsigned int
#endif
#ifdef __BEOS__
......@@ -1372,7 +1372,7 @@ xmlNanoFTPGetConnection(void *ctx) {
#else
struct sockaddr_in dataAddr;
#endif
SOCKLEN_T dataAddrLen;
XML_SOCKLEN_T dataAddrLen;
if (ctxt == NULL) return(-1);
......
......@@ -69,7 +69,7 @@
#ifdef VMS
#include <stropts>
#define SOCKLEN_T unsigned int
#define XML_SOCKLEN_T unsigned int
#define SOCKET int
#endif
......@@ -78,8 +78,8 @@
#define _WINSOCKAPI_
#include <wsockcompat.h>
#include <winsock2.h>
#undef SOCKLEN_T
#define SOCKLEN_T unsigned int
#undef XML_SOCKLEN_T
#define XML_SOCKLEN_T unsigned int
#endif
......@@ -107,8 +107,8 @@
#endif
#endif
#ifndef SOCKLEN_T
#define SOCKLEN_T unsigned int
#ifndef XML_SOCKLEN_T
#define XML_SOCKLEN_T unsigned int
#endif
#ifndef SOCKET
#define SOCKET int
......@@ -861,7 +861,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
|| FD_ISSET(s, &xfd)
#endif
) {
SOCKLEN_T len;
XML_SOCKLEN_T len;
len = sizeof(status);
#ifdef SO_ERROR
if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char*)&status, &len) < 0 ) {
......
......@@ -31,8 +31,8 @@
#define _WINSOCKAPI_
#include <wsockcompat.h>
#include <winsock2.h>
#undef SOCKLEN_T
#define SOCKLEN_T unsigned int
#undef XML_SOCKLEN_T
#define XML_SOCKLEN_T unsigned int
#endif
#ifdef HAVE_SYS_TIMEB_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment