Changeset 21077 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jun 30, 2009 3:19:12 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49335
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r21073 r21077 51 51 LIBRARIES += RuntimeR3 52 52 DLLS += VBoxRT 53 54 # Temporary(?) hack. 55 VBOX_WITH_LIBXML2_IN_VBOXRT= 53 56 54 57 else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_DOCS … … 162 165 # 163 166 RuntimeR3_TEMPLATE = VBOXR3STATIC 164 RuntimeR3_SDKS = VBOX_LIBXML2165 167 RuntimeR3_SDKS.win = WINPSDK W2K3DDK 166 168 RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP … … 304 306 r3/test.cpp \ 305 307 r3/testi.cpp \ 306 r3/tcp.cpp \ 307 r3/xml.cpp 308 r3/tcp.cpp 308 309 309 310 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86) … … 786 787 # 787 788 VBoxRT_TEMPLATE = VBOXR3 789 ifdef VBOX_WITH_LIBXML2_IN_VBOXRT 788 790 VBoxRT_SDKS = VBOX_OPENSSL VBOX_LIBXML2 VBOX_LIBCURL 791 endif 789 792 VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL 790 793 ifeq ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING),darwin) … … 796 799 VBox/VBoxRTDeps.cpp \ 797 800 $(RuntimeR3_SOURCES) 801 if defined(VBOX_WITH_LIBXML2_IN_VBOXRT) 798 802 VBoxRT_SOURCES += \ 799 803 common/misc/s3.cpp 804 endif 800 805 VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET)) 801 806 VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) … … 813 818 $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB) 814 819 endif 820 ifdef VBOX_WITH_LIBXML2_IN_VBOXRT 821 ifndef SDK_VBOX_LIBXML2_LIBS 815 822 VBoxRT_LIBS += \ 816 823 $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB) 824 endif 825 ifndef SDK_VBOX_OPENSSL_LIBS 817 826 VBoxRT_LIBS += \ 818 827 $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) 828 endif 829 endif 819 830 VBoxRT_LIBS.darwin = \ 820 831 iconv … … 840 851 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) 841 852 853 ifdef VBOX_WITH_LIBXML2_IN_VBOXRT 854 VBox/VBoxRTDeps.cpp_DEFS = VBOX_WITH_LIBXML2_IN_VBOXRT 855 endif 856 842 857 if1of ($(DLLS), VBoxRT) 843 858 $$(VBoxRT_0_OUTDIR)/VBoxRT.def: \ 844 859 $(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),) 846 861 $(RM) -f -- $@ 847 862 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^ -
trunk/src/VBox/Runtime/VBox/VBoxRTDeps.cpp
r21073 r21077 36 36 #include <iprt/assert.h> 37 37 #include <iprt/asm.h> 38 38 #ifdef VBOX_WITH_LIBXML2_IN_VBOXRT 39 39 # include <libxml/xmlmodule.h> 40 40 # include <libxml/globals.h> … … 44 44 # include <openssl/x509.h> 45 45 # include <openssl/rsa.h> 46 #endif 46 47 47 48 … … 54 55 (PFNRT)SUPR3PageAllocEx, 55 56 (PFNRT)SUPSemEventCreate, 57 #ifdef VBOX_WITH_LIBXML2_IN_VBOXRT 56 58 (PFNRT)xmlModuleOpen, 57 59 (PFNRT)MD5_Init, … … 63 65 (PFNRT)i2d_X509, 64 66 (PFNRT)RSA_generate_key, 67 #endif 65 68 (PFNRT)RTAssertShouldPanic, 66 69 (PFNRT)ASMAtomicReadU64, -
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r21073 r21077 42 42 #include <iprt/err.h> 43 43 #include <iprt/test.h> 44 #include <iprt/ministring_cpp.h>45 44 46 45 #include <stdlib.h> /** @todo use our random. */ … … 927 926 928 927 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 // 12345678965 // ^966 // 0123456967 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 KB980 CHECK_DUMP( (third == "newstring 123456"), morebytes.c_str() );981 CHECK( (third.capacity() == 100 * 1024) );982 CHECK( (third.length() == morebytes.length()) ); // must not have changed983 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 loops1004 copy2.append("1");1005 }1006 CHECK( (copy2.length() == 100) );1007 1008 #undef CHECK1009 }1010 1011 928 int main() 1012 929 { … … 1029 946 TstRTStrXCmp(hTest); 1030 947 testStrStr(hTest); 1031 1032 testMinistring(hTest);1033 1034 948 Benchmarks(hTest); 1035 949
Note:
See TracChangeset
for help on using the changeset viewer.