diff --git a/icu4c/source/common/putil.c b/icu4c/source/common/putil.c index 8d9f54945ff..ba8de2f3e36 100644 --- a/icu4c/source/common/putil.c +++ b/icu4c/source/common/putil.c @@ -40,10 +40,6 @@ # include #endif -#ifdef __QNXNTO__ -#include -#endif - #ifndef PTX /* Define _XOPEN_SOURCE for Solaris and friends. */ @@ -111,7 +107,7 @@ # include #elif defined(OS390) #include "unicode/ucnv.h" /* Needed for UCNV_SWAP_LFNL_OPTION_STRING */ -#elif defined(AIX) +#elif defined(U_AIX) /* # include */ @@ -120,13 +116,16 @@ # include # include */ -#elif defined(HPUX) +#elif defined(U_HPUX) /* # include */ #elif defined(U_DARWIN) #include #include +#elif defined(U_QNX) +#include +#endif #endif /* Define the extension for data files, again... */ @@ -1191,7 +1190,7 @@ uprv_timezone() /* Note that U_TZNAME does *not* have to be tzname, but if it is, some platforms need to have it declared here. */ -#if defined(IRIX) || defined(U_DARWIN) /* For SGI or Mac OS X. */ +#if defined(U_IRIX) || defined(U_DARWIN) /* For SGI or Mac OS X. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #elif defined(U_CYGWIN) extern U_IMPORT char *_tzname[2]; diff --git a/icu4c/source/common/umapfile.c b/icu4c/source/common/umapfile.c index fb4b200d620..f665f82da76 100644 --- a/icu4c/source/common/umapfile.c +++ b/icu4c/source/common/umapfile.c @@ -46,7 +46,7 @@ # define MAP_IMPLEMENTATION MAP_WIN32 /* ### Todo: properly auto detect mmap(). Until then, just add your platform here. */ -#elif U_HAVE_MMAP || defined(AIX) || defined(HPUX) || defined(OS390) || defined(PTX) +#elif U_HAVE_MMAP || defined(U_AIX) || defined(U_HPUX) || defined(OS390) || defined(PTX) typedef size_t MemoryMap; # define IS_MAP(map) ((map)!=0) @@ -177,7 +177,7 @@ } /* get a view of the mapping */ -#ifndef HPUX +#ifndef U_HPUX data=mmap(0, length, PROT_READ, MAP_SHARED, fd, 0); #else data=mmap(0, length, PROT_READ, MAP_PRIVATE, fd, 0); diff --git a/icu4c/source/configure b/icu4c/source/configure index f2a3677636c..fc8cc3e5ca0 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -3935,8 +3935,8 @@ case "${host}" in *-*-solaris*) platform=U_SOLARIS ;; *-*-linux*) platform=U_LINUX ;; *-*-*bsd*) platform=U_BSD ;; - *-*-aix*) platform=AIX ;; - *-*-hpux*) platform=HPUX ;; + *-*-aix*) platform=U_AIX ;; + *-*-hpux*) platform=U_HPUX ;; *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;; *-*-cygwin*|*-*-mingw*) platform=U_CYGWIN ;; *-*ibm-openedition*|*-*-os390*) platform=OS390 @@ -3946,7 +3946,7 @@ case "${host}" in *-*-nto*) platform=U_QNX ;; *-dec-osf*) platform=U_OSF ;; *-*-beos) platform=U_BEOS ;; - *-*-irix*) platform=IRIX ;; + *-*-irix*) platform=U_IRIX ;; *-ncr-*) platform=U_MPRAS ;; *-sequent-*) platform=PTX ;; *) platform=U_UNKNOWN_PLATFORM ;; diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index 0ac73abc8ae..20e7e157542 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -4,7 +4,7 @@ dnl Copyright (c) 1999-2003, International Business Machines Corporation and dnl others. All Rights Reserved. dnl Stephen F. Booth, heavily modified by Yves and others -dnl $Id: configure.in,v 1.202 2003/12/13 00:10:45 grhoten-oss Exp $ +dnl $Id: configure.in,v 1.203 2003/12/14 18:06:32 grhoten-oss Exp $ dnl Process this file with autoconf to produce a configure script AC_INIT(common/unicode/utypes.h) @@ -827,8 +827,8 @@ case "${host}" in *-*-solaris*) platform=U_SOLARIS ;; *-*-linux*) platform=U_LINUX ;; *-*-*bsd*) platform=U_BSD ;; - *-*-aix*) platform=AIX ;; - *-*-hpux*) platform=HPUX ;; + *-*-aix*) platform=U_AIX ;; + *-*-hpux*) platform=U_HPUX ;; *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;; *-*-cygwin*|*-*-mingw*) platform=U_CYGWIN ;; *-*ibm-openedition*|*-*-os390*) platform=OS390 @@ -838,7 +838,7 @@ case "${host}" in *-*-nto*) platform=U_QNX ;; *-dec-osf*) platform=U_OSF ;; *-*-beos) platform=U_BEOS ;; - *-*-irix*) platform=IRIX ;; + *-*-irix*) platform=U_IRIX ;; *-ncr-*) platform=U_MPRAS ;; *-sequent-*) platform=PTX ;; *) platform=U_UNKNOWN_PLATFORM ;; diff --git a/icu4c/source/test/cintltst/cmsgtst.c b/icu4c/source/test/cintltst/cmsgtst.c index 96ac6ea00fb..8fc8a88d455 100644 --- a/icu4c/source/test/cintltst/cmsgtst.c +++ b/icu4c/source/test/cintltst/cmsgtst.c @@ -209,10 +209,10 @@ static void MessageFormatTest( void ) austrdup(result), austrdup(testResultStrings[i]) ); } -#if !defined(HPUX) +#if !defined(U_HPUX) /* HP/UX and possibly other platforms don't properly check for this case. We pass in a UDate, but the function expects a UDate *. When va_arg is used, - most compilers will return NULL, but HP/UX won't do that and will return 2 + most compilers will return NULL, but HP-UX won't do that and will return 2 in this case. This is a platform dependent test. */ umsg_parse(formatter,result,resultLength,&count,&ec,one,two,d2); diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index 14ae907e635..20b002cd2b7 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -1307,7 +1307,7 @@ void NumberFormatRegressionTest::Test4106658(void) UnicodeString temp; FieldPosition pos(FieldPosition::DONT_CARE); -#if defined(HPUX) +#if defined(U_HPUX) d1 = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword #else d1 *= -1.0; // Some compilers have a problem with defining -0.0 @@ -1438,7 +1438,7 @@ void NumberFormatRegressionTest::Test4106667(void) FieldPosition pos(FieldPosition::DONT_CARE); logln("pattern: \"" + df->toPattern(temp) + "\""); -#if defined(HPUX) +#if defined(U_HPUX) d = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword #else d *= -1.0; // Some compilers have a problem with defining -0.0 @@ -1851,7 +1851,7 @@ void NumberFormatRegressionTest::Test4147706(void) volatile double d1 = 0.0; // volatile to prevent code optimization double d2 = -0.0001; -#if defined(HPUX) +#if defined(U_HPUX) d1 = 0.0 * -1.0; // old HPUX compiler ignores volatile keyword #else d1 *= -1.0; // Some compilers have a problem with defining -0.0 diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index a0bb2c4da03..f01df1fa580 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -22,7 +22,7 @@ #define POSIX 1 #endif -#if defined(POSIX) || defined(U_SOLARIS) || defined(AIX) || defined(HPUX) +#if defined(POSIX) || defined(U_SOLARIS) || defined(U_AIX) || defined(U_HPUX) #define HAVE_IMP @@ -207,7 +207,7 @@ SimpleThread::sleep(int32_t millis) #endif -#if defined(POSIX)||defined(U_SOLARIS)||defined(AIX)||defined(HPUX) +#if defined(POSIX)||defined(U_SOLARIS)||defined(U_AIX)||defined(U_HPUX) #define HAVE_IMP struct PosixThreadImplementation @@ -261,7 +261,7 @@ void SimpleThread::sleep(int32_t millis) #ifdef HPUX_CMA cma_sleep(millis/100); -#elif defined(HPUX) || defined(OS390) +#elif defined(U_HPUX) || defined(OS390) millis *= 1000; while(millis >= 1000000) { usleep(999999); diff --git a/icu4c/source/tools/pkgdata/dllmode.c b/icu4c/source/tools/pkgdata/dllmode.c index 7fc6aae3c53..ae49a7fa9d1 100644 --- a/icu4c/source/tools/pkgdata/dllmode.c +++ b/icu4c/source/tools/pkgdata/dllmode.c @@ -162,7 +162,7 @@ void pkg_mode_dll(UPKGOptions *o, FileStream *makefile, UErrorCode *status) T_FileStream_writeLine(makefile,"build-objs: $(SOURCES) $(OBJECTS)\n\n$(OBJECTS): $(SOURCES)\n\n"); -#ifdef HPUX +#ifdef U_HPUX T_FileStream_writeLine(makefile, "$(TARGETDIR)/$(FINAL_SO_TARGET): $(OBJECTS) $(HPUX_JUNK_OBJ) $(LISTFILES) $(DLL_DEPS)\n" "\t$(SHLIB.cc) -o $@ $(OBJECTS) $(HPUX_JUNK_OBJ) $(DLL_LDFLAGS)\n" "\t-ls -l $@\n\n"); @@ -236,7 +236,7 @@ void pkg_mode_dll(UPKGOptions *o, FileStream *makefile, UErrorCode *status) T_FileStream_writeLine(makefile, "$(NAME).map:\n\techo \"{global: $(TOCSYM); local: *; };\" > $@\n\n"); #endif -#ifdef AIX +#ifdef U_AIX T_FileStream_writeLine(makefile, "$(NAME).map:\n\techo \"$(TOCSYM)\" > $@\n\n"); #endif