add dissection of PN-IO IOxS field (should removed the gcc warning), some more code...
[obnox/wireshark/wip.git] / xmlstub.h
index ee2a856670ea5974478f932119045a3df083349e..47a6d0a0ef216f36459fabe402df763922af5f55 100644 (file)
--- a/xmlstub.h
+++ b/xmlstub.h
@@ -8,6 +8,13 @@
 
 #include "config.h"
 
+/****************** specific to ethereal ********************************/
+/*
+ * Uncomment the following line to restore XML_DO_VALIDITY_CHECKING
+ * behavior which is causing issues on WIN32 platforms. See:
+ * http://www.ethereal.com/lists/ethereal-dev/200410/msg00194.html
+ */
+/* #define ETHEREAL_XML_DO_VALIDITY_CHECKING */
 /****************** From xml headers ************************************/
 
 /*
@@ -97,14 +104,12 @@ extern void xmlCheckVersion(int version);
 /*
  * Whether iconv support is available
  */
-#ifndef WIN32
-#if 1
+#ifdef HAVE_ICONV_H
 #define LIBXML_ICONV_ENABLED
 #include <iconv.h>
 #else
 #define LIBXML_ICONV_DISABLED
 #endif
-#endif
 
 /*
  * Whether Debugging module is configured in
@@ -123,7 +128,7 @@ extern void xmlCheckVersion(int version);
 #endif
 
 #ifndef LIBXML_DLL_IMPORT
-#if defined(WIN32) && !defined(STATIC)
+#if defined(_WIN32) && !defined(STATIC)
 #define LIBXML_DLL_IMPORT __declspec(dllimport)
 #else
 #define LIBXML_DLL_IMPORT
@@ -190,7 +195,7 @@ typedef enum {
 
 typedef unsigned char xmlChar;
 
-#ifndef WIN32
+#ifndef _WIN32
 #ifndef CHAR
 #define CHAR xmlChar
 #endif
@@ -452,7 +457,7 @@ struct _xmlNode {
     struct _xmlNode *prev;      /* previous sibling link  */
     struct _xmlDoc  *doc;       /* the containing document */
     xmlNs           *ns;        /* pointer to the associated namespace */
-#ifndef XML_USE_BUFFER_CONTENT    
+#ifndef XML_USE_BUFFER_CONTENT
     xmlChar         *content;   /* the content */
 #else
     xmlBufferPtr     content;   /* the content in a buffer */
@@ -583,7 +588,7 @@ typedef int (* xmlCharEncodingOutputFunc)(unsigned char* out, int *outlen,
 
 /*
  * Block defining the handlers for non UTF-8 encodings.
- * If iconv is supported, there is two extra fields 
+ * If iconv is supported, there is two extra fields
  */
 
 typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
@@ -609,9 +614,9 @@ struct _xmlParserInputBuffer {
     void*                  context;
     xmlInputReadCallback   readcallback;
     xmlInputCloseCallback  closecallback;
-    
+
     xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
+
     xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 */
     xmlBufferPtr raw;       /* if encoder != NULL buffer for raw input */
 };
@@ -634,9 +639,9 @@ struct _xmlOutputBuffer {
     void*                   context;
     xmlOutputWriteCallback  writecallback;
     xmlOutputCloseCallback  closecallback;
-    
+
     xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
+
     xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 or ISOLatin */
     xmlBufferPtr conv;      /* if encoder != NULL buffer for output */
     int written;            /* total number of byte written */
@@ -677,7 +682,7 @@ struct _xmlParserInput {
 
 /**
  * the parser can be asked to collect Node informations, i.e. at what
- * place in the file they were detected. 
+ * place in the file they were detected.
  * NOTE: This is off by default and not very well tested.
  */
 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
@@ -864,7 +869,7 @@ struct _xmlParserCtxt {
     xmlValidCtxt        vctxt;        /* The validity context */
 
     xmlParserInputState instate;      /* current type of input */
-    int                 token;        /* next char look-ahead */    
+    int                 token;        /* next char look-ahead */
 
     char           *directory;        /* the data directory */
 
@@ -1090,16 +1095,15 @@ typedef struct {
        char            *(*xmlGetProp)(xmlNodePtr, char *);
        int              (*xmlKeepBlanksDefault)(int);
        int              (*xmlSubstituteEntitiesDefault)(int);
-       
-       /* Variables */
-       int              *xmlDoValidityCheckingDefaultValue;
-       
+#ifdef ETHEREAL_XML_DO_VALIDITY_CHECKING
+  int              *xmlDoValidityCheckingDefaultValue;
+#endif
 } XML_STUB;
 
 XML_EXTERN XML_STUB XmlStub;
 XML_EXTERN int XmlStubInitialized;
 
-#ifdef WIN32
+#ifdef _WIN32
 /* We're in windows, use the windows filename */
 #define XML_LIBRARY "libxml2.dll"
 #else
@@ -1113,7 +1117,7 @@ XML_EXTERN int XmlStubInitialized;
  * is not installed on the current system.  (Or it's not in
  * the LD path)
  */
-int loadLibXML();
+int loadLibXML(void);