After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 55476 - nanohttp.c and nanoftp.c fail to compile with MSVC++ 6.0
nanohttp.c and nanoftp.c fail to compile with MSVC++ 6.0
Status: VERIFIED INCOMPLETE
Product: libxml
Classification: Deprecated
Component: general
unspecified
Other Windows
: Normal blocker
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-05-30 12:53 UTC by dany
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dany 2001-05-30 12:53:15 UTC
nanohttp.c and nanoftp.c fail to compile with Microsoft Visual C++ 6.0 with
many errors related to socket API.

The version of libxml2 is 2.3.9

Adding a conditional macro definition for INCLUDE_WINSOCK before including
libxml.h as per below fixes these problems.

#ifdef WIN32
#define INCLUDE_WINSOCK
#endif

#include "libxml.h"
Comment 1 Daniel Veillard 2001-06-05 10:17:39 UTC
It is a bit surprizing, I don't maintain directly
the Windows port but I think those issues had been fixed a long
time ago using defines in include/winconfig.h and the
specific project files in win32/libxml2

Were you using those ?

Daniel
Comment 2 yond 2001-06-08 06:21:29 UTC
dany is right. To compile 2.3.10 (current CVS version is the same), I 
had to do the following:

* add #define INCLUDE_WINSOCK to win32config.h (essentially the same 
thing what dany did but I think a bit cleaner)
* from libxml2.def.src remove reference to sgmlDefaultSAXHandlerInit 
(looks like a left-over, it's not present anywhere in the code)

--- win32/libxml2/libxml2.def.src       Fri Apr 27 10:13:01 2001
+++ f:/kjk/src_other/libxml2-
2.3.10/win32/libxml2/libxml2.def.src       Wed Jun 06 02:02:16 2001
@@ -434,7 +434,6 @@
        cdataBlock
        xmlDefaultSAXHandlerInit
        htmlDefaultSAXHandlerInit
-       sgmlDefaultSAXHandlerInit

 /*
  * strio.h




--- include/win32config.h       Mon Apr 16 10:46:18 2001
+++ f:/kjk/src_other/libxml2-2.3.10/include/win32config.h       Wed 
Jun 06 01:58:12 2001
@@ -9,6 +9,8 @@
 #define LIBXML_DLL_IMPORT
 #define SOCKLEN_T int

+#define INCLUDE_WINSOCK
+
 #ifdef INCLUDE_WINSOCK
 #include <winsock2.h>
Comment 3 yond 2001-06-08 06:34:47 UTC
Forgot to mention: add catalog.h and catalog.c to MSVC 6.0 project 
file:

--- win32/libxml2/libxml2_so.dsp        Mon Apr 16 10:46:18 2001
+++ f:/kjk/src_other/libxml2-
2.3.10/win32/libxml2/libxml2_so.dsp        Wed Jun 06 01:55:52 2001
@@ -94,6 +94,10 @@
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 # Begin Source File

+SOURCE=..\..\catalog.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\debugXML.c
 # End Source File
 # Begin Source File
@@ -224,6 +228,10 @@
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
 # Begin Source File

+SOURCE=..\..\include\libxml\catalog.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\include\libxml\debugXML.h
 # End Source File
 # Begin Source File