From 759d6be0562e5aab67ba1ceca2a87c40c11f4a4f Mon Sep 17 00:00:00 2001
From: Vladimir Weinstein
Date: Mon, 31 Jul 2000 22:33:44 +0000
Subject: [PATCH] ICU-460 OS/390 related changes
X-SVN-Rev: 2079
---
icu4c/readme.html | 2 ++
icu4c/source/common/unicode/ustring.h | 2 ++
icu4c/source/common/unistr.cpp | 2 +-
icu4c/source/test/cintltst/putiltst.c | 9 ++++++++-
icu4c/source/tools/icupkg.inc.in | 4 ++++
5 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/icu4c/readme.html b/icu4c/readme.html
index cce8f0d01c4..1d1de258951 100644
--- a/icu4c/readme.html
+++ b/icu4c/readme.html
@@ -631,6 +631,8 @@ important that you understand a few details:
Examples for configuring ICU:
Debug build: IEEE390=1 ./configure
Release build: CFLAGS=-2 IEEE390=1 ./configure
+ Since the default make on OS/390 is not gmake, pkgdata tool requires that the environment
+ variable MAKE be set to path to gmake.
The makedep executable that is used with the OS/390 ICU build
process is not shipped with ICU. It is available at the
OS/390 UNIX - Tools and Toys
diff --git a/icu4c/source/common/unicode/ustring.h b/icu4c/source/common/unicode/ustring.h
index ea5918f7aec..1db760eb03f 100644
--- a/icu4c/source/common/unicode/ustring.h
+++ b/icu4c/source/common/unicode/ustring.h
@@ -291,7 +291,9 @@ u_unescape(const char *src,
* pointer will be whatever is passed into u_unescapeAt().
* @see u_unescapeAt
*/
+U_CDECL_BEGIN
typedef UChar (*UNESCAPE_CHAR_AT)(int32_t offset, void *context);
+U_CDECL_END
/**
* Unescape a single sequence. The character at offset-1 is assumed
diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
index 44d6cfe99f6..43b9ba105f3 100644
--- a/icu4c/source/common/unistr.cpp
+++ b/icu4c/source/common/unistr.cpp
@@ -448,7 +448,7 @@ UnicodeString UnicodeString::unescape() const {
}
// u_unescapeAt() callback to get a UChar from a UnicodeString
-static UChar _charAt(int32_t offset, void *context) {
+U_CFUNC UChar _charAt(int32_t offset, void *context) {
return ((UnicodeString*) context)->charAt(offset);
}
diff --git a/icu4c/source/test/cintltst/putiltst.c b/icu4c/source/test/cintltst/putiltst.c
index ab02be012e9..49b28713ce4 100644
--- a/icu4c/source/test/cintltst/putiltst.c
+++ b/icu4c/source/test/cintltst/putiltst.c
@@ -106,8 +106,11 @@ void TestPUtilAPI(){
log_verbose("Testing the API uprv_log10()\n");
doAssert(uprv_log10(3456), 3, "uprv_log10(3456) failed.");
+#ifdef OS390
+ doAssert(uprv_log10(1.0e55), 55, "uprv_log10(1.0e55) failed.");
+#else
doAssert(uprv_log10(1.0e300), 300, "uprv_log10(1.0e300) failed.");
-
+#endif
log_verbose("Testing the API uprv_isNegativeInfinity()\n");
isTrue=uprv_isNegativeInfinity(uprv_getInfinity() * -1);
if(isTrue != TRUE){
@@ -256,7 +259,11 @@ void TestPUtilAPI(){
log_verbose("Testing uprv_nextDouble() where the value is NaN ...\n");
expn1=uprv_nextDouble(uprv_getNaN(), TRUE);
doAssert(expn1, uprv_getNaN(), "uprv_nextDouble(uprv_getNaN(), TRUE) failed.");
+#ifdef OS390
+ y1=4.9406564584125e-78;
+#else
y1=4.9406564584125e-324;
+#endif
doAssert(uprv_nextDouble(0, TRUE), y1, "uprv_nextDouble(0, TRUE) failed.");
doAssert(uprv_nextDouble(0, FALSE), -y1, "uprv_nextDouble(0, FALSE) failed.");
diff --git a/icu4c/source/tools/icupkg.inc.in b/icu4c/source/tools/icupkg.inc.in
index 0cdb24e1ec4..ddc9ac04a1d 100644
--- a/icu4c/source/tools/icupkg.inc.in
+++ b/icu4c/source/tools/icupkg.inc.in
@@ -89,6 +89,10 @@ LPATHS=../../source/common:../../source/i18n:../../source/tools/toolutil
TOOL=env LD_LIBRARY_PATH=$(LPATHS) LIBPATH=$(LPATHS)
+ifeq ($(strip $(PLATFORM)),OS390)
+ TOOL=
+endif
+
ifeq ($(strip $(PLATFORM)),AIX)
TOOL=env LIBPATH=$(LPATHS)
endif