VirtualBox

Changeset 21077 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jun 30, 2009 3:19:12 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49335
Message:

back out r49329, r49331, will start over

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r21073 r21077  
    5151 LIBRARIES += RuntimeR3
    5252 DLLS += VBoxRT
     53
     54 # Temporary(?) hack.
     55 VBOX_WITH_LIBXML2_IN_VBOXRT=
    5356
    5457else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_DOCS
     
    162165#
    163166RuntimeR3_TEMPLATE      = VBOXR3STATIC
    164 RuntimeR3_SDKS          = VBOX_LIBXML2
    165167RuntimeR3_SDKS.win      = WINPSDK W2K3DDK
    166168RuntimeR3_DEFS          = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
     
    304306        r3/test.cpp \
    305307        r3/testi.cpp \
    306         r3/tcp.cpp \
    307         r3/xml.cpp
     308        r3/tcp.cpp
    308309
    309310#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
     
    786787#
    787788VBoxRT_TEMPLATE                = VBOXR3
     789ifdef VBOX_WITH_LIBXML2_IN_VBOXRT
    788790VBoxRT_SDKS                    = VBOX_OPENSSL VBOX_LIBXML2 VBOX_LIBCURL
     791endif
    789792VBoxRT_SDKS.win                = WINPSDK W2K3DDK VBOX_NTDLL
    790793ifeq ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING),darwin)
     
    796799        VBox/VBoxRTDeps.cpp \
    797800        $(RuntimeR3_SOURCES)
     801if defined(VBOX_WITH_LIBXML2_IN_VBOXRT)
    798802VBoxRT_SOURCES                += \
    799803        common/misc/s3.cpp
     804endif
    800805VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
    801806VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
     
    813818        $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
    814819endif
     820ifdef VBOX_WITH_LIBXML2_IN_VBOXRT
     821 ifndef SDK_VBOX_LIBXML2_LIBS
    815822  VBoxRT_LIBS                 += \
    816823        $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
     824 endif
     825 ifndef SDK_VBOX_OPENSSL_LIBS
    817826  VBoxRT_LIBS                 += \
    818827        $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
     828 endif
     829endif
    819830VBoxRT_LIBS.darwin             = \
    820831        iconv
     
    840851        $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
    841852
     853ifdef VBOX_WITH_LIBXML2_IN_VBOXRT
     854VBox/VBoxRTDeps.cpp_DEFS = VBOX_WITH_LIBXML2_IN_VBOXRT
     855endif
     856
    842857if1of ($(DLLS), VBoxRT)
    843858$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
    844859                $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
    845                 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
     860                $(if-expr defined(VBOX_WITH_LIBXML2_IN_VBOXRT),$(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def),)
    846861        $(RM) -f -- $@
    847862        $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
  • trunk/src/VBox/Runtime/VBox/VBoxRTDeps.cpp

    r21073 r21077  
    3636#include <iprt/assert.h>
    3737#include <iprt/asm.h>
    38 
     38#ifdef VBOX_WITH_LIBXML2_IN_VBOXRT
    3939# include <libxml/xmlmodule.h>
    4040# include <libxml/globals.h>
     
    4444# include <openssl/x509.h>
    4545# include <openssl/rsa.h>
     46#endif
    4647
    4748
     
    5455    (PFNRT)SUPR3PageAllocEx,
    5556    (PFNRT)SUPSemEventCreate,
     57#ifdef VBOX_WITH_LIBXML2_IN_VBOXRT
    5658    (PFNRT)xmlModuleOpen,
    5759    (PFNRT)MD5_Init,
     
    6365    (PFNRT)i2d_X509,
    6466    (PFNRT)RSA_generate_key,
     67#endif
    6568    (PFNRT)RTAssertShouldPanic,
    6669    (PFNRT)ASMAtomicReadU64,
  • trunk/src/VBox/Runtime/testcase/tstUtf8.cpp

    r21073 r21077  
    4242#include <iprt/err.h>
    4343#include <iprt/test.h>
    44 #include <iprt/ministring_cpp.h>
    4544
    4645#include <stdlib.h> /** @todo use our random. */
     
    927926
    928927
    929 void testMinistring(RTTEST hTest)
    930 {
    931     RTTestSub(hTest, "class ministring");
    932 
    933 #define CHECK(expr) \
    934     do { \
    935         if (!(expr)) \
    936             RTTestFailed(hTest, "%d: FAILED %s", __LINE__, #expr); \
    937     } while (0)
    938 
    939 #define CHECK_DUMP(expr, value) \
    940     do { \
    941         if (!(expr)) \
    942             RTTestFailed(hTest, "%d: FAILED %s, got \"%s\"", __LINE__, #expr, value); \
    943     } while (0)
    944 
    945 #define CHECK_DUMP_I(expr) \
    946     do { \
    947         if (!(expr)) \
    948             RTTestFailed(hTest, "%d: FAILED %s, got \"%d\"", __LINE__, #expr, expr); \
    949     } while (0)
    950 
    951     ministring empty;
    952     CHECK( (empty.length() == 0) );
    953     CHECK( (empty.capacity() == 0) );
    954 
    955     ministring sixbytes("12345");
    956     CHECK( (sixbytes.length() == 5) );
    957     CHECK( (sixbytes.capacity() == 6) );
    958 
    959     sixbytes.append("678");
    960     CHECK( (sixbytes.length() == 8) );
    961     CHECK( (sixbytes.capacity() == 9) );
    962 
    963     char *psz = sixbytes.mutableRaw();
    964         // 12345678
    965         //       ^
    966         // 0123456
    967     psz[6] = '\0';
    968     sixbytes.jolt();
    969     CHECK( (sixbytes.length() == 6) );
    970     CHECK( (sixbytes.capacity() == 7) );
    971 
    972     ministring morebytes("tobereplaced");
    973     morebytes = "newstring ";
    974     morebytes.append(sixbytes);
    975 
    976     CHECK_DUMP( (morebytes == "newstring 123456"), morebytes.c_str() );
    977 
    978     ministring third(morebytes);
    979     third.reserve(100 * 1024);      // 100 KB
    980     CHECK_DUMP( (third == "newstring 123456"), morebytes.c_str() );
    981     CHECK( (third.capacity() == 100 * 1024) );
    982     CHECK( (third.length() == morebytes.length()) );        // must not have changed
    983 
    984     ministring copy1(morebytes);
    985     ministring copy2 = morebytes;
    986     CHECK( (copy1 == copy2) );
    987 
    988     copy1 = NULL;
    989     CHECK( (copy1.isNull()) );
    990 
    991     copy1 = "";
    992     CHECK( (copy1.isEmpty()) );
    993 
    994     CHECK( (ministring("abc") < ministring("def")) );
    995     CHECK( (ministring("abc") != ministring("def")) );
    996     CHECK_DUMP_I( (ministring("def") > ministring("abc")) );
    997 
    998     copy2.setNull();
    999     for (int i = 0;
    1000          i < 100;
    1001          ++i)
    1002     {
    1003         copy2.reserve(50);      // should be ignored after 50 loops
    1004         copy2.append("1");
    1005     }
    1006     CHECK( (copy2.length() == 100) );
    1007 
    1008 #undef CHECK
    1009 }
    1010 
    1011928int main()
    1012929{
     
    1029946    TstRTStrXCmp(hTest);
    1030947    testStrStr(hTest);
    1031 
    1032     testMinistring(hTest);
    1033 
    1034948    Benchmarks(hTest);
    1035949
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