ICU-3298 redefine AIX->U_AIX, HPUX->U_HPUX and IRIX->U_IRIX

X-SVN-Rev: 14126
This commit is contained in:
George Rhoten 2003-12-14 18:06:34 +00:00
parent 8936eb60fd
commit 975d6cfe2c
8 changed files with 25 additions and 26 deletions

View file

@ -40,10 +40,6 @@
# include<sys/types.h>
#endif
#ifdef __QNXNTO__
#include <sys/neutrino.h>
#endif
#ifndef PTX
/* Define _XOPEN_SOURCE for Solaris and friends. */
@ -111,7 +107,7 @@
# include <TextUtils.h>
#elif defined(OS390)
#include "unicode/ucnv.h" /* Needed for UCNV_SWAP_LFNL_OPTION_STRING */
#elif defined(AIX)
#elif defined(U_AIX)
/*
# include <sys/ldr.h>
*/
@ -120,13 +116,16 @@
# include <dlfcn.h>
# include <link.h>
*/
#elif defined(HPUX)
#elif defined(U_HPUX)
/*
# include <dl.h>
*/
#elif defined(U_DARWIN)
#include <sys/file.h>
#include <sys/param.h>
#elif defined(U_QNX)
#include <sys/neutrino.h>
#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];

View file

@ -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);

View file

@ -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 ;;

View file

@ -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 ;;

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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