X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..ba6d6ed23dec08b1cd5700a128c0752491c10ac9:/icuSources/test/cintltst/cintltst.c diff --git a/icuSources/test/cintltst/cintltst.c b/icuSources/test/cintltst/cintltst.c index a09b2392..52d274c2 100644 --- a/icuSources/test/cintltst/cintltst.c +++ b/icuSources/test/cintltst/cintltst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2010, International Business Machines Corporation and + * Copyright (c) 1997-2011, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -494,7 +494,7 @@ char *aescstrdup(const UChar* unichars,int32_t length){ const void *p; UErrorCode errorCode = U_ZERO_ERROR; #if U_CHARSET_FAMILY==U_EBCDIC_FAMILY -# ifdef OS390 +# if U_PLATFORM == U_PF_OS390 static const char convName[] = "ibm-1047"; # else static const char convName[] = "ibm-37"; @@ -692,9 +692,19 @@ U_CFUNC UBool assertEquals(const char* message, const char* expected, *-------------------------------------------------------------------- */ -U_CFUNC UBool isICUVersionAtLeast(const UVersionInfo x) { - UVersionInfo v; - u_getVersion(v); - return (uprv_memcmp(v, x, U_MAX_VERSION_LENGTH) >= 0); +U_CFUNC UBool isICUVersionBefore(int major, int minor, int milli) { + UVersionInfo iv; + UVersionInfo ov; + ov[0] = (uint8_t)major; + ov[1] = (uint8_t)minor; + ov[2] = (uint8_t)milli; + ov[3] = 0; + u_getVersion(iv); + return uprv_memcmp(iv, ov, U_MAX_VERSION_LENGTH) < 0; } + +U_CFUNC UBool isICUVersionAtLeast(int major, int minor, int milli) { + return !isICUVersionBefore(major, minor, milli); +} + #endif