Index: trunk/src/libs/libxml2-2.13.2/catalog.c
===================================================================
--- trunk/src/libs/libxml2-2.13.2/catalog.c	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/catalog.c	(revision 105448)
@@ -59,17 +59,4 @@
 #define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR "/sgml/catalog"
 #endif
-
-#if defined(_WIN32) && defined(_MSC_VER)
-#undef XML_XML_DEFAULT_CATALOG
-//static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR "/xml/catalog";
-static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
-#if !defined(_WINDOWS_)
-void* __stdcall GetModuleHandleA(const char*);
-unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
-#endif
-#endif
-
-static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
-static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
 
 /************************************************************************
Index: trunk/src/libs/libxml2-2.13.2/dict.c
===================================================================
--- trunk/src/libs/libxml2-2.13.2/dict.c	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/dict.c	(revision 105448)
@@ -1018,4 +1018,5 @@
     return(result & 0xFFFFFFFF);
 }
+#endif
 
 /*
@@ -1028,4 +1029,5 @@
 unsigned
 xmlGlobalRandom(void) {
+#ifndef VBOX
     unsigned ret;
 
@@ -1035,6 +1037,8 @@
 
     return(ret);
-}
-#endif //VBOX
+#else
+    return RTRandU32();
+#endif
+}
 
 /*
@@ -1048,22 +1052,8 @@
 xmlRandom(void) {
 #ifndef VBOX
-#ifdef XML_THREAD_LOCAL
-    if (!localRngInitialized) {
-        xmlMutexLock(&xmlRngMutex);
-        localRngState[0] = xoroshiro64ss(globalRngState);
-        localRngState[1] = xoroshiro64ss(globalRngState);
-        localRngInitialized = 1;
-        xmlMutexUnlock(&xmlRngMutex);
-    }
-
-    return(xoroshiro64ss(localRngState));
+#ifdef LIBXML_THREAD_ENABLED
+    return(xoroshiro64ss(xmlGetLocalRngState()));
 #else
-    unsigned ret;
-
-    xmlMutexLock(&xmlRngMutex);
-    ret = xoroshiro64ss(globalRngState);
-    xmlMutexUnlock(&xmlRngMutex);
-
-    return(ret);
+    return(xmlGlobalRandom());
 #endif
 #else
Index: trunk/src/libs/libxml2-2.13.2/globals.c
===================================================================
--- trunk/src/libs/libxml2-2.13.2/globals.c	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/globals.c	(revision 105448)
@@ -596,7 +596,9 @@
 #endif
 
+#ifndef VBOX
 #ifdef LIBXML_THREAD_ENABLED
     xmlMainThreadRngState[0] = xmlGlobalRandom();
     xmlMainThreadRngState[1] = xmlGlobalRandom();
+#endif
 #endif
 }
Index: trunk/src/libs/libxml2-2.13.2/include/libxml/xmlexports.h
===================================================================
--- trunk/src/libs/libxml2-2.13.2/include/libxml/xmlexports.h	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/include/libxml/xmlexports.h	(revision 105448)
@@ -31,4 +31,15 @@
 #define XMLPUBVAR XMLPUBLIC extern
 
+/* bird/VirtualBox: Visibility attributes - start  */
+/* frank: changed to "hidden" */
+#if defined(VBOX_HAVE_VISIBILITY_HIDDEN) && !defined(LIBXML_STATIC) && defined(IN_LIBXML)
+  #undef XMLPUBFUN
+  #undef XMLPUBVAR
+  #define XMLPUBFUN __attribute__((visibility("hidden")))
+  #define XMLPUBVAR __attribute__((visibility("hidden"))) extern
+#endif
+/* bird/VirtualBox: Visibility attributes - end  */
+
+
 /* Compatibility */
 #define XMLCALL
@@ -41,8 +52,4 @@
  * Attributes
  */
-// VBOX. Get rid of warning C4668
-//#ifndef __GNUC__
-//#define __GNUC__ 0
-//#endif
 
 #ifndef ATTRIBUTE_UNUSED
@@ -132,15 +139,4 @@
 #endif
 
-/* bird/VirtualBox: Visibility attributes - start  */
-/* frank: changed to "hidden" */
-#if defined(VBOX_HAVE_VISIBILITY_HIDDEN) && !defined(LIBXML_STATIC) && defined(IN_LIBXML)
-  #undef XMLPUBFUN
-  #undef XMLPUBVAR
-  #define XMLPUBFUN __attribute__((visibility("hidden")))
-  #define XMLPUBVAR __attribute__((visibility("hidden"))) extern
-#endif
-/* bird/VirtualBox: Visibility attributes - end  */
-
-
 /*
  * Originally declared in xmlversion.h which is generated
Index: trunk/src/libs/libxml2-2.13.2/include/libxml/xmlversion.h
===================================================================
--- trunk/src/libs/libxml2-2.13.2/include/libxml/xmlversion.h	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/include/libxml/xmlversion.h	(revision 105448)
@@ -11,18 +11,4 @@
 #define __XML_VERSION_H__
 
-#include <libxml/xmlexports.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * use those to be sure nothing nasty will happen if
- * your library and includes mismatch
- */
-#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void xmlCheckVersion(int version);
-#endif /* LIBXML2_COMPILING_MSCCDEF */
-
 /**
  * LIBXML_DOTTED_VERSION:
@@ -30,5 +16,5 @@
  * the version string like "1.2.3"
  */
-#define LIBXML_DOTTED_VERSION "2.12.6"
+#define LIBXML_DOTTED_VERSION "2.13.2"
 
 /**
@@ -37,5 +23,5 @@
  * the version number: 1.2.3 value is 10203
  */
-#define LIBXML_VERSION 21206
+#define LIBXML_VERSION 21302
 
 /**
@@ -44,5 +30,5 @@
  * the version number string, 1.2.3 value is "10203"
  */
-#define LIBXML_VERSION_STRING "21206"
+#define LIBXML_VERSION_STRING "21302"
 
 /**
@@ -59,30 +45,5 @@
  * the version the software has been compiled against
  */
-#define LIBXML_TEST_VERSION xmlCheckVersion(21206);
-
-#ifndef VMS
-#if 0
-/**
- * WITH_TRIO:
- *
- * defined if the trio support need to be configured in
- */
-#define WITH_TRIO
-#else
-/**
- * WITHOUT_TRIO:
- *
- * defined if the trio support should not be configured in
- */
-#define WITHOUT_TRIO
-#endif
-#else /* VMS */
-/**
- * WITH_TRIO:
- *
- * defined if the trio support need to be configured in
- */
-#define WITH_TRIO 1
-#endif /* VMS */
+#define LIBXML_TEST_VERSION xmlCheckVersion(21302);
 
 /**
@@ -303,22 +264,4 @@
 
 /**
- * DEBUG_MEMORY_LOCATION:
- *
- * Whether the memory debugging is configured in
- */
-#if 0
-#define DEBUG_MEMORY_LOCATION
-#endif
-
-/**
- * LIBXML_DEBUG_RUNTIME:
- *
- * Removed
- */
-#if 0
-#define LIBXML_DEBUG_RUNTIME
-#endif
-
-/**
  * LIBXML_UNICODE_ENABLED:
  *
@@ -409,103 +352,7 @@
 #endif
 
-#ifdef __GNUC__
-/** DOC_DISABLE */
-
-#ifndef ATTRIBUTE_UNUSED
-# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
-#  define ATTRIBUTE_UNUSED __attribute__((unused))
-# else
-#  define ATTRIBUTE_UNUSED
-# endif
-#endif
-
-#ifndef LIBXML_ATTR_ALLOC_SIZE
-# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
-#  define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
-# else
-#  define LIBXML_ATTR_ALLOC_SIZE(x)
-# endif
-#else
-# define LIBXML_ATTR_ALLOC_SIZE(x)
-#endif
-
-#ifndef LIBXML_ATTR_FORMAT
-# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
-#  define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
-# else
-#  define LIBXML_ATTR_FORMAT(fmt,args)
-# endif
-#else
-# define LIBXML_ATTR_FORMAT(fmt,args)
-#endif
-
-#ifndef XML_DEPRECATED
-#  if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
-#    define XML_DEPRECATED
-/* Available since at least GCC 3.1 */
-#  else
-#    define XML_DEPRECATED __attribute__((deprecated))
-#  endif
-#endif
-
-#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
-  #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
-    #define XML_IGNORE_FPTR_CAST_WARNINGS \
-      _Pragma("GCC diagnostic push") \
-      _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
-      _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
-  #else
-    #define XML_IGNORE_FPTR_CAST_WARNINGS \
-      _Pragma("GCC diagnostic push") \
-      _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
-  #endif
-  #define XML_POP_WARNINGS \
-    _Pragma("GCC diagnostic pop")
-#else
-  #define XML_IGNORE_FPTR_CAST_WARNINGS
-  #define XML_POP_WARNINGS
-#endif
-
-#else /* ! __GNUC__ */
-#define ATTRIBUTE_UNUSED
-#define LIBXML_ATTR_ALLOC_SIZE(x)
-#define LIBXML_ATTR_FORMAT(fmt,args)
-#ifndef XML_DEPRECATED
-#  if defined (IN_LIBXML) || !defined (_MSC_VER)
-#    define XML_DEPRECATED
-/* Available since Visual Studio 2005 */
-#  elif defined (_MSC_VER) && (_MSC_VER >= 1400)
-#    define XML_DEPRECATED __declspec(deprecated)
-#  endif
-#endif
-#if defined (_MSC_VER) && (_MSC_VER >= 1400)
-#  define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
-#else
-#  define XML_IGNORE_FPTR_CAST_WARNINGS
-#endif
-#ifndef XML_POP_WARNINGS
-#  if defined (_MSC_VER) && (_MSC_VER >= 1400)
-#    define XML_POP_WARNINGS __pragma(warning(pop))
-#  else
-#    define XML_POP_WARNINGS
-#  endif
-#endif
-#endif /* __GNUC__ */
-
-#define XML_NO_ATTR
-
-#ifdef LIBXML_THREAD_ENABLED
-  #define XML_DECLARE_GLOBAL(name, type, attrs) \
-    attrs XMLPUBFUN type *__##name(void);
-  #define XML_GLOBAL_MACRO(name) (*__##name())
-#else
-  #define XML_DECLARE_GLOBAL(name, type, attrs) \
-    attrs XMLPUBVAR type name;
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif
-
-
+#include <libxml/xmlexports.h>
+
+#endif
+
+
Index: trunk/src/libs/libxml2-2.13.2/threads.c
===================================================================
--- trunk/src/libs/libxml2-2.13.2/threads.c	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/threads.c	(revision 105448)
@@ -644,5 +644,7 @@
 
     xmlCleanupDictInternal();
+#ifndef VBOX
     xmlCleanupRandom();
+#endif
     xmlCleanupGlobalsInternal();
     /*
Index: trunk/src/libs/libxml2-2.13.2/xmlIO.c
===================================================================
--- trunk/src/libs/libxml2-2.13.2/xmlIO.c	(revision 105429)
+++ trunk/src/libs/libxml2-2.13.2/xmlIO.c	(revision 105448)
@@ -350,5 +350,5 @@
  ************************************************************************/
 
-#if defined(_WIN32)
+#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
 
 /**
@@ -423,5 +423,5 @@
 {
 #ifdef HAVE_STAT
-#if defined(_WIN32)
+#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
     struct _stat stat_buffer;
 #else
@@ -435,5 +435,5 @@
 
 #ifdef HAVE_STAT
-#if defined(_WIN32)
+#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
     {
         wchar_t *wpath;
