ICU-371 changed LINUX and SOLARIS to U_LINUX and U_SOLARIS, also

changed HAVE_INTTYPES_H to U_HAVE_INTTYPES_H.

X-SVN-Rev: 1726
This commit is contained in:
Yves Arrouye 2000-06-30 21:35:03 +00:00
parent a12beff355
commit d37141dcac
16 changed files with 57 additions and 58 deletions

View file

@ -34,7 +34,7 @@
#undef SIZEOF_WCHAR_T
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
#undef U_HAVE_INTTYPES_H
/* Define if you have the cma library (-lcma). */
#undef HAVE_LIBCMA

View file

@ -86,7 +86,7 @@
# include <Script.h>
#elif defined(AIX)
# include <sys/ldr.h>
#elif defined(SOLARIS) || defined(LINUX)
#elif defined(U_SOLARIS) || defined(U_LINUX)
# include <dlfcn.h>
# include <link.h>
#elif defined(HPUX)
@ -848,7 +848,7 @@ getLibraryPath(char *path, int size) {
# elif defined(OS390)
# elif defined(OS400)
# elif defined(XP_MAC)
# elif defined(SOLARIS)
# elif defined(U_SOLARIS)
void *handle=dlopen(U_COMMON_LIBNAME, RTLD_LAZY); /* "libicu-uc.so" */
if(handle!=NULL) {
Link_map *p=NULL;
@ -880,7 +880,7 @@ getLibraryPath(char *path, int size) {
dlclose(handle);
return length;
}
# elif defined(LINUX)
# elif defined(U_LINUX)
# elif defined(AIX)
void *handle=(void*)load(U_COMMON_LIBNAME, L_LIBPATH_EXEC, "."); /* "libicu-uc.a" */
if(handle!=NULL) {
@ -977,8 +977,8 @@ findLibraryPath(char *path, int size) {
# define LIB_FILENAME "libicuuc.a"
# elif defined(OS400)
# elif defined(XP_MAC)
# elif defined(SOLARIS)
# elif defined(LINUX)
# elif defined(U_SOLARIS)
# elif defined(U_LINUX)
# define LIB_PATH_VAR "LD_LIBRARY_PATH"
# define LIB_FILENAME "libicuuc.so"
# elif defined(AIX)
@ -1480,7 +1480,7 @@ const char* uprv_getDefaultCodepage()
{
uprv_memset(codesetName, 0, 100);
}
#ifdef LINUX
#ifdef U_LINUX
if (nl_langinfo(_NL_CTYPE_CODESET_NAME) != NULL)
uprv_strcpy(codesetName, nl_langinfo(_NL_CTYPE_CODESET_NAME));
#else

View file

@ -136,28 +136,27 @@ isAlias(const char *alias, UErrorCode *pErrorCode) {
}
}
/* compare lowercase str1 with mixed-case str2, ignoring case */
/* compare lowercase str1 with mixed-case str2, both being charset names */
static int
strHalfCaseCmp(const char *str1, const char *str2) {
/* compare non-NULL strings lexically with lowercase */
charsetNameCmp(const char *str1, const char *str2) {
int rc;
unsigned char c1, c2;
for(;;) {
c1=(unsigned char)*str1;
c2=(unsigned char)*str2;
if(c1==0) {
if(c2==0) {
for (;;) {
c1 = (unsigned char) *str1;
c2 = (unsigned char) *str2;
if (c1 == 0) {
if(c2 == 0) {
return 0;
} else {
return -1;
}
} else if(c2==0) {
} else if (c2 == 0) {
return 1;
} else {
/* compare non-zero characters with lowercase */
rc=(int)c1-(int)(unsigned char)uprv_tolower(c2);
if(rc!=0) {
rc = (int) c1 - (int) (unsigned char) uprv_tolower(c2);
if(rc != 0) {
return rc;
}
}
@ -192,7 +191,7 @@ findAlias(const char *alias) {
start=0;
while(start<limit-1) {
i=(start+limit)/2;
if(strHalfCaseCmp(name, (const char *)aliasTable+p[i])<0) {
if(charsetNameCmp(name, (const char *)aliasTable+p[i])<0) {
limit=i;
} else {
start=i;
@ -200,7 +199,7 @@ findAlias(const char *alias) {
}
/* did we really find it? */
if(strHalfCaseCmp(name, (const char *)aliasTable+p[start])==0) {
if(charsetNameCmp(name, (const char *)aliasTable+p[start])==0) {
limit=*(p-1); /* aliasCount */
p+=limit; /* advance to the second column of the alias table */
i=p[start]; /* converter index */

View file

@ -209,7 +209,7 @@
# define MAP_IMPLEMENTATION MAP_WIN32
/* ### Todo: auto detect mmap(). Until then, just add your platform here. */
#elif defined(LINUX) || defined(POSIX) || defined(SOLARIS) || defined(AIX) || defined(HPUX) || defined(OS390) || defined(PTX)
#elif defined(U_LINUX) || defined(POSIX) || defined(U_SOLARIS) || defined(AIX) || defined(HPUX) || defined(OS390) || defined(PTX)
typedef size_t MemoryMap;
# define NO_MAP 0

View file

@ -22,8 +22,8 @@
#endif
/* Define whether inttypes.h is available */
#ifndef HAVE_INTTYPES_H
#define HAVE_INTTYPES_H @HAVE_INTTYPES_H@
#ifndef U_HAVE_INTTYPES_H
#define U_HAVE_INTTYPES_H @U_HAVE_INTTYPES_H@
#endif
/*
@ -97,7 +97,7 @@
/* If your platform does not have the <inttypes.h> header, you may
need to edit the typedefs below. */
#if HAVE_INTTYPES_H
#if U_HAVE_INTTYPES_H
#include <inttypes.h>
#else
#include <sys/types.h>

View file

@ -22,7 +22,7 @@
#endif
/* Define whether inttypes.h is available */
#define HAVE_INTTYPES_H 0
#define U_HAVE_INTTYPES_H 0
/*
* Define what support for C++ streams is available.
@ -58,7 +58,7 @@
/* If your platform does not have the <inttypes.h> header, you may
need to edit the typedefs below. */
#if HAVE_INTTYPES_H
#if U_HAVE_INTTYPES_H
#include <inttypes.h>
#else

View file

@ -23,7 +23,7 @@
#endif
/* Define whether inttypes.h is available */
#define HAVE_INTTYPES_H 0
#define U_HAVE_INTTYPES_H 0
/*
* Define what support for C++ streams is available.
@ -59,7 +59,7 @@
/* If your platform does not have the <inttypes.h> header, you may
need to edit the typedefs below. */
#if HAVE_INTTYPES_H
#if U_HAVE_INTTYPES_H
#include <inttypes.h>
#else

View file

@ -22,7 +22,7 @@
#endif
/* Define whether inttypes.h is available */
#define HAVE_INTTYPES_H 0
#define U_HAVE_INTTYPES_H 0
/*
* Define what support for C++ streams is available.
@ -58,7 +58,7 @@
/* If your platform does not have the <inttypes.h> header, you may
need to edit the typedefs below. */
#if HAVE_INTTYPES_H
#if U_HAVE_INTTYPES_H
#include <inttypes.h>
#else

View file

@ -2,7 +2,7 @@
#******************************************************************************
# Copyright (C) 1999, International Business Machines
# Corporation and others. All Rights Reserved.
# $Revision: 1.2 $
# $Revision: 1.3 $
#******************************************************************************
# This Makefile is designed to be included into projects which make use
# of the ICU.
@ -52,7 +52,7 @@ host_vendor=@host_vendor@
host_os=@host_os@
LIB_M=@LIB_M@
CPP=@CPP@
HAVE_INTTYPES_H=@HAVE_INTTYPES_H@
U_HAVE_INTTYPES_H=@U_HAVE_INTTYPES_H@
U_IS_BIG_ENDIAN=@U_IS_BIG_ENDIAN@
HAVE_INT8_T=@HAVE_INT8_T@
HAVE_UINT8_T=@HAVE_UINT8_T@

View file

@ -2068,9 +2068,9 @@ fi
done
if test $ac_cv_header_inttypes_h = no; then
HAVE_INTTYPES_H=0
U_HAVE_INTTYPES_H=0
else
HAVE_INTTYPES_H=1
U_HAVE_INTTYPES_H=1
fi
@ -2908,16 +2908,16 @@ else
fi
case "${host}" in
*-*-solaris*) platform=SOLARIS ;;
*-*-linux*) platform=LINUX ;;
*-*-freebsd*) platform=LINUX ;;
*-*-solaris*) platform=U_SOLARIS ;;
*-*-linux*) platform=U_LINUX ;;
*-*-freebsd*) platform=U_LINUX ;;
*-*-aix*) platform=AIX ;;
*-*-hpux*) platform=HPUX ;;
*-*-irix*) platform=IRIX ;;
*-*-os390*) platform=OS390 ;;
*-*-os400*) platform=OS400 ;;
*-apple-rhapsody*) platform=RHAPSODY ;;
*) platform=UNKNOWN ;;
*-apple-rhapsody*) platform=U_RHAPSODY ;;
*) platform=U_UNKNOWN_PLATFORM ;;
esac
host_frag=$icu_cv_host_frag
@ -3154,7 +3154,7 @@ s%@THREADS_FALSE@%$THREADS_FALSE%g
s%@ICU_USE_THREADS@%$ICU_USE_THREADS%g
s%@HAVE_DLOPEN@%$HAVE_DLOPEN%g
s%@CPP@%$CPP%g
s%@HAVE_INTTYPES_H@%$HAVE_INTTYPES_H%g
s%@U_HAVE_INTTYPES_H@%$U_HAVE_INTTYPES_H%g
s%@CXXCPP@%$CXXCPP%g
s%@U_IOSTREAM_SOURCE@%$U_IOSTREAM_SOURCE%g
s%@U_IS_BIG_ENDIAN@%$U_IS_BIG_ENDIAN%g

View file

@ -197,11 +197,11 @@ AC_SUBST(HAVE_DLOPEN)
dnl Checks for header files
AC_CHECK_HEADERS(inttypes.h)
if test $ac_cv_header_inttypes_h = no; then
HAVE_INTTYPES_H=0
U_HAVE_INTTYPES_H=0
else
HAVE_INTTYPES_H=1
U_HAVE_INTTYPES_H=1
fi
AC_SUBST(HAVE_INTTYPES_H)
AC_SUBST(U_HAVE_INTTYPES_H)
if test x$U_IOSTREAM_SOURCE = x
then
@ -370,17 +370,17 @@ ICU_CONDITIONAL(SAMPLES, test "$samples" = true)
dnl Platform-specific Makefile setup
case "${host}" in
*-*-solaris*) platform=SOLARIS ;;
*-*-linux*) platform=LINUX ;;
*-*-freebsd*) platform=LINUX ;;
*-*-solaris*) platform=U_SOLARIS ;;
*-*-linux*) platform=U_LINUX ;;
*-*-freebsd*) platform=U_LINUX ;;
*-*-aix*) platform=AIX ;;
*-sequent-*) platform=PTX ;;
*-*-hpux*) platform=HPUX ;;
*-*-irix*) platform=IRIX ;;
*-*-os390*) platform=OS390 ;;
*-*-os400*) platform=OS400 ;;
*-apple-rhapsody*) platform=RHAPSODY ;;
*) platform=UNKNOWN ;;
*-apple-rhapsody*) platform=U_RHAPSODY ;;
*) platform=U_UNKNOWN_PLATFORM ;;
esac
AC_SUBST(platform)
host_frag=$icu_cv_host_frag

View file

@ -134,7 +134,7 @@ ctest_getTestDirectory()
{
if (_testDirectory == NULL)
{
#if defined(_AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
#if defined(_AIX) || defined(U_SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
ctest_setTestDirectory("source|test|testdata|");
#else
ctest_setTestDirectory("icu|source|test|testdata|");

View file

@ -376,7 +376,7 @@ IntlTest::pathnameInContext( char* fullname, int32_t maxsize, const char* relPat
mainDirBuffer[0]='\0';
}
mainDir=mainDirBuffer;
#elif defined(_AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
#elif defined(_AIX) || defined(U_SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
char mainDirBuffer[200];
strcpy(mainDirBuffer, u_getDataDirectory());
strcat(mainDirBuffer, "/../");
@ -402,7 +402,7 @@ IntlTest::pathnameInContext( char* fullname, int32_t maxsize, const char* relPat
}
mainDir=mainDirBuffer;
sepChar = '\\';
#elif defined(_AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(OS390)
#elif defined(_AIX) || defined(SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(OS390)
mainDir = getenv("HOME");
sepChar = '/';
#elif defined(XP_MAC)
@ -443,7 +443,7 @@ IntlTest::getTestDirectory()
{
if (_testDirectory == NULL)
{
#if defined(_AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
#if defined(_AIX) || defined(SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390)
setTestDirectory("source|test|testdata|");
#else
setTestDirectory("icu|source|test|testdata|");

View file

@ -16,7 +16,7 @@
#define POSIX 1
#endif
#if defined(POSIX)||defined(SOLARIS)||defined(AIX)||defined(HPUX)
#if defined(POSIX)||defined(U_SOLARIS)||defined(AIX)||defined(HPUX)
#define HAVE_IMP
#include <pthread.h>
@ -180,7 +180,7 @@ SimpleThread::sleep(int32_t millis)
#endif
#if defined(POSIX)||defined(SOLARIS)||defined(AIX)||defined(HPUX)
#if defined(POSIX)||defined(U_SOLARIS)||defined(AIX)||defined(HPUX)
#define HAVE_IMP
struct PosixThreadImplementation
@ -227,7 +227,7 @@ void SimpleThread::start()
void SimpleThread::sleep(int32_t millis)
{
#ifdef SOLARIS
#ifdef U_SOLARIS
sigignore(SIGALRM);
#endif

View file

@ -8,7 +8,7 @@
#include <stdio.h>
#include <string.h>
#ifdef SOLARIS
#ifdef U_SOLARIS
#include <signal.h>
#endif

View file

@ -54,7 +54,7 @@ host_vendor=@host_vendor@
host_os=@host_os@
LIB_M=@LIB_M@
CPP=@CPP@
HAVE_INTTYPES_H=@HAVE_INTTYPES_H@
U_HAVE_INTTYPES_H=@U_HAVE_INTTYPES_H@
U_IS_BIG_ENDIAN=@U_IS_BIG_ENDIAN@
HAVE_INT8_T=@HAVE_INT8_T@
HAVE_UINT8_T=@HAVE_UINT8_T@
@ -94,6 +94,6 @@ ifeq ($(strip $(PLATFORM)),HPUX)
TOOL=env LD_LIBRARY_PATH=../source/common:../source/i18n:../source/tools/toolutil
endif
ifeq ($(strip $(PLATFORM)),LINUX)
ifeq ($(strip $(PLATFORM)),U_LINUX)
TOOL=env LD_LIBRARY_PATH=../source/common:../source/i18n:../source/tools/toolutil
endif