VirtualBox

Changeset 105448 in vbox for trunk/src/libs


Ignore:
Timestamp:
Jul 23, 2024 1:57:44 PM (4 months ago)
Author:
vboxsync
Message:

libxml2-2.13.2: builds and runs on Linux. bugref:10730

Location:
trunk/src/libs/libxml2-2.13.2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/libxml2-2.13.2/catalog.c

    r105420 r105448  
    5959#define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR "/sgml/catalog"
    6060#endif
    61 
    62 #if defined(_WIN32) && defined(_MSC_VER)
    63 #undef XML_XML_DEFAULT_CATALOG
    64 //static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR "/xml/catalog";
    65 static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
    66 #if !defined(_WINDOWS_)
    67 void* __stdcall GetModuleHandleA(const char*);
    68 unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
    69 #endif
    70 #endif
    71 
    72 static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
    73 static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
    7461
    7562/************************************************************************
  • trunk/src/libs/libxml2-2.13.2/dict.c

    r105421 r105448  
    10181018    return(result & 0xFFFFFFFF);
    10191019}
     1020#endif
    10201021
    10211022/*
     
    10281029unsigned
    10291030xmlGlobalRandom(void) {
     1031#ifndef VBOX
    10301032    unsigned ret;
    10311033
     
    10351037
    10361038    return(ret);
    1037 }
    1038 #endif //VBOX
     1039#else
     1040    return RTRandU32();
     1041#endif
     1042}
    10391043
    10401044/*
     
    10481052xmlRandom(void) {
    10491053#ifndef VBOX
    1050 #ifdef XML_THREAD_LOCAL
    1051     if (!localRngInitialized) {
    1052         xmlMutexLock(&xmlRngMutex);
    1053         localRngState[0] = xoroshiro64ss(globalRngState);
    1054         localRngState[1] = xoroshiro64ss(globalRngState);
    1055         localRngInitialized = 1;
    1056         xmlMutexUnlock(&xmlRngMutex);
    1057     }
    1058 
    1059     return(xoroshiro64ss(localRngState));
     1054#ifdef LIBXML_THREAD_ENABLED
     1055    return(xoroshiro64ss(xmlGetLocalRngState()));
    10601056#else
    1061     unsigned ret;
    1062 
    1063     xmlMutexLock(&xmlRngMutex);
    1064     ret = xoroshiro64ss(globalRngState);
    1065     xmlMutexUnlock(&xmlRngMutex);
    1066 
    1067     return(ret);
     1057    return(xmlGlobalRandom());
    10681058#endif
    10691059#else
  • trunk/src/libs/libxml2-2.13.2/globals.c

    r105420 r105448  
    596596#endif
    597597
     598#ifndef VBOX
    598599#ifdef LIBXML_THREAD_ENABLED
    599600    xmlMainThreadRngState[0] = xmlGlobalRandom();
    600601    xmlMainThreadRngState[1] = xmlGlobalRandom();
     602#endif
    601603#endif
    602604}
  • trunk/src/libs/libxml2-2.13.2/include/libxml/xmlexports.h

    r105421 r105448  
    3131#define XMLPUBVAR XMLPUBLIC extern
    3232
     33/* bird/VirtualBox: Visibility attributes - start  */
     34/* frank: changed to "hidden" */
     35#if defined(VBOX_HAVE_VISIBILITY_HIDDEN) && !defined(LIBXML_STATIC) && defined(IN_LIBXML)
     36  #undef XMLPUBFUN
     37  #undef XMLPUBVAR
     38  #define XMLPUBFUN __attribute__((visibility("hidden")))
     39  #define XMLPUBVAR __attribute__((visibility("hidden"))) extern
     40#endif
     41/* bird/VirtualBox: Visibility attributes - end  */
     42
     43
    3344/* Compatibility */
    3445#define XMLCALL
     
    4152 * Attributes
    4253 */
    43 // VBOX. Get rid of warning C4668
    44 //#ifndef __GNUC__
    45 //#define __GNUC__ 0
    46 //#endif
    4754
    4855#ifndef ATTRIBUTE_UNUSED
     
    132139#endif
    133140
    134 /* bird/VirtualBox: Visibility attributes - start  */
    135 /* frank: changed to "hidden" */
    136 #if defined(VBOX_HAVE_VISIBILITY_HIDDEN) && !defined(LIBXML_STATIC) && defined(IN_LIBXML)
    137   #undef XMLPUBFUN
    138   #undef XMLPUBVAR
    139   #define XMLPUBFUN __attribute__((visibility("hidden")))
    140   #define XMLPUBVAR __attribute__((visibility("hidden"))) extern
    141 #endif
    142 /* bird/VirtualBox: Visibility attributes - end  */
    143 
    144 
    145141/*
    146142 * Originally declared in xmlversion.h which is generated
  • trunk/src/libs/libxml2-2.13.2/include/libxml/xmlversion.h

    r105420 r105448  
    1111#define __XML_VERSION_H__
    1212
    13 #include <libxml/xmlexports.h>
    14 
    15 #ifdef __cplusplus
    16 extern "C" {
    17 #endif
    18 
    19 /*
    20  * use those to be sure nothing nasty will happen if
    21  * your library and includes mismatch
    22  */
    23 #ifndef LIBXML2_COMPILING_MSCCDEF
    24 XMLPUBFUN void xmlCheckVersion(int version);
    25 #endif /* LIBXML2_COMPILING_MSCCDEF */
    26 
    2713/**
    2814 * LIBXML_DOTTED_VERSION:
     
    3016 * the version string like "1.2.3"
    3117 */
    32 #define LIBXML_DOTTED_VERSION "2.12.6"
     18#define LIBXML_DOTTED_VERSION "2.13.2"
    3319
    3420/**
     
    3723 * the version number: 1.2.3 value is 10203
    3824 */
    39 #define LIBXML_VERSION 21206
     25#define LIBXML_VERSION 21302
    4026
    4127/**
     
    4430 * the version number string, 1.2.3 value is "10203"
    4531 */
    46 #define LIBXML_VERSION_STRING "21206"
     32#define LIBXML_VERSION_STRING "21302"
    4733
    4834/**
     
    5945 * the version the software has been compiled against
    6046 */
    61 #define LIBXML_TEST_VERSION xmlCheckVersion(21206);
    62 
    63 #ifndef VMS
    64 #if 0
    65 /**
    66  * WITH_TRIO:
    67  *
    68  * defined if the trio support need to be configured in
    69  */
    70 #define WITH_TRIO
    71 #else
    72 /**
    73  * WITHOUT_TRIO:
    74  *
    75  * defined if the trio support should not be configured in
    76  */
    77 #define WITHOUT_TRIO
    78 #endif
    79 #else /* VMS */
    80 /**
    81  * WITH_TRIO:
    82  *
    83  * defined if the trio support need to be configured in
    84  */
    85 #define WITH_TRIO 1
    86 #endif /* VMS */
     47#define LIBXML_TEST_VERSION xmlCheckVersion(21302);
    8748
    8849/**
     
    303264
    304265/**
    305  * DEBUG_MEMORY_LOCATION:
    306  *
    307  * Whether the memory debugging is configured in
    308  */
    309 #if 0
    310 #define DEBUG_MEMORY_LOCATION
    311 #endif
    312 
    313 /**
    314  * LIBXML_DEBUG_RUNTIME:
    315  *
    316  * Removed
    317  */
    318 #if 0
    319 #define LIBXML_DEBUG_RUNTIME
    320 #endif
    321 
    322 /**
    323266 * LIBXML_UNICODE_ENABLED:
    324267 *
     
    409352#endif
    410353
    411 #ifdef __GNUC__
    412 /** DOC_DISABLE */
    413 
    414 #ifndef ATTRIBUTE_UNUSED
    415 # if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
    416 #  define ATTRIBUTE_UNUSED __attribute__((unused))
    417 # else
    418 #  define ATTRIBUTE_UNUSED
    419 # endif
    420 #endif
    421 
    422 #ifndef LIBXML_ATTR_ALLOC_SIZE
    423 # if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
    424 #  define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
    425 # else
    426 #  define LIBXML_ATTR_ALLOC_SIZE(x)
    427 # endif
    428 #else
    429 # define LIBXML_ATTR_ALLOC_SIZE(x)
    430 #endif
    431 
    432 #ifndef LIBXML_ATTR_FORMAT
    433 # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
    434 #  define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
    435 # else
    436 #  define LIBXML_ATTR_FORMAT(fmt,args)
    437 # endif
    438 #else
    439 # define LIBXML_ATTR_FORMAT(fmt,args)
    440 #endif
    441 
    442 #ifndef XML_DEPRECATED
    443 #  if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
    444 #    define XML_DEPRECATED
    445 /* Available since at least GCC 3.1 */
    446 #  else
    447 #    define XML_DEPRECATED __attribute__((deprecated))
    448 #  endif
    449 #endif
    450 
    451 #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
    452   #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
    453     #define XML_IGNORE_FPTR_CAST_WARNINGS \
    454       _Pragma("GCC diagnostic push") \
    455       _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
    456       _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
    457   #else
    458     #define XML_IGNORE_FPTR_CAST_WARNINGS \
    459       _Pragma("GCC diagnostic push") \
    460       _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
    461   #endif
    462   #define XML_POP_WARNINGS \
    463     _Pragma("GCC diagnostic pop")
    464 #else
    465   #define XML_IGNORE_FPTR_CAST_WARNINGS
    466   #define XML_POP_WARNINGS
    467 #endif
    468 
    469 #else /* ! __GNUC__ */
    470 #define ATTRIBUTE_UNUSED
    471 #define LIBXML_ATTR_ALLOC_SIZE(x)
    472 #define LIBXML_ATTR_FORMAT(fmt,args)
    473 #ifndef XML_DEPRECATED
    474 #  if defined (IN_LIBXML) || !defined (_MSC_VER)
    475 #    define XML_DEPRECATED
    476 /* Available since Visual Studio 2005 */
    477 #  elif defined (_MSC_VER) && (_MSC_VER >= 1400)
    478 #    define XML_DEPRECATED __declspec(deprecated)
    479 #  endif
    480 #endif
    481 #if defined (_MSC_VER) && (_MSC_VER >= 1400)
    482 #  define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
    483 #else
    484 #  define XML_IGNORE_FPTR_CAST_WARNINGS
    485 #endif
    486 #ifndef XML_POP_WARNINGS
    487 #  if defined (_MSC_VER) && (_MSC_VER >= 1400)
    488 #    define XML_POP_WARNINGS __pragma(warning(pop))
    489 #  else
    490 #    define XML_POP_WARNINGS
    491 #  endif
    492 #endif
    493 #endif /* __GNUC__ */
    494 
    495 #define XML_NO_ATTR
    496 
    497 #ifdef LIBXML_THREAD_ENABLED
    498   #define XML_DECLARE_GLOBAL(name, type, attrs) \
    499     attrs XMLPUBFUN type *__##name(void);
    500   #define XML_GLOBAL_MACRO(name) (*__##name())
    501 #else
    502   #define XML_DECLARE_GLOBAL(name, type, attrs) \
    503     attrs XMLPUBVAR type name;
    504 #endif
    505 
    506 #ifdef __cplusplus
    507 }
    508 #endif /* __cplusplus */
    509 #endif
    510 
    511 
     354#include <libxml/xmlexports.h>
     355
     356#endif
     357
     358
  • trunk/src/libs/libxml2-2.13.2/threads.c

    r105420 r105448  
    644644
    645645    xmlCleanupDictInternal();
     646#ifndef VBOX
    646647    xmlCleanupRandom();
     648#endif
    647649    xmlCleanupGlobalsInternal();
    648650    /*
  • trunk/src/libs/libxml2-2.13.2/xmlIO.c

    r105421 r105448  
    350350 ************************************************************************/
    351351
    352 #if defined(_WIN32)
     352#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
    353353
    354354/**
     
    423423{
    424424#ifdef HAVE_STAT
    425 #if defined(_WIN32)
     425#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
    426426    struct _stat stat_buffer;
    427427#else
     
    435435
    436436#ifdef HAVE_STAT
    437 #if defined(_WIN32)
     437#if (defined(_WIN32) || defined (__DJGPP__)) && !defined (__CYGWIN__) && !defined(IPRT_NO_CRT)
    438438    {
    439439        wchar_t *wpath;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette