Re: [xml] Problem when building libxml2 with Borland C++ 6

On Thu, Feb 09, 2006 at 01:59:39PM +1100, Eric Zurcher csiro au wrote:
OK. Here's a patch that works, and while still somewhat ugly, isn't
completely replusive:


Index: include/wsockcompat.h
RCS file: /cvs/gnome/libxml2/include/wsockcompat.h,v
retrieving revision 1.3
diff -u -r1.3 wsockcompat.h
--- include/wsockcompat.h     4 Jan 2006 09:55:16 -0000       1.3
+++ include/wsockcompat.h     9 Feb 2006 02:29:16 -0000
@@ -10,6 +10,9 @@
 #undef HAVE_ERRNO_H
 #include <winsock2.h>
+#if defined(__BORLANDC__) && !defined(__cplusplus)
+#define inline __inline
 #include <ws2tcpip.h>
 /* Check if ws2tcpip.h is a recent version which provides getaddrinfo()
 #if defined(GetAddrInfo) 


It turns out that the Borland compiler has an __inline keyword for C,
equivalent to the standard inline keyword for C++. This just makes use
of it.

Of course, this solution is still not ideal, since the fix really should
be in the ws2tcpip.h distributed by Borland, not here in libxml2.

  This looks cleaner than the original patch, I also added a 2 line comment
about the problem it's here to fix and commited.

  thanks a lot !


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]