ICU-200 OS400 update

X-SVN-Rev: 797
This commit is contained in:
Steven R. Loomis 2000-02-18 21:05:24 +00:00
parent 232559f831
commit 6c77945014
5 changed files with 113 additions and 4 deletions

View file

@ -997,7 +997,7 @@ u_getDataDirectory(void) {
char *path;
int length;
# if !defined(OS400) && !defined(XP_MAC)
# if !defined(XP_MAC)
/* first try to get the environment variable */
path=getenv("ICU_DATA");
/* fprintf(stderr, " ******** ICU_DATA=%s ********** \n", path); */

View file

@ -996,7 +996,8 @@ UnicodeString::extract(UTextOffset start,
// there is no loop here since we assume the buffer is large enough
myTargetLimit = myTarget + arraySize;
if(myTargetLimit < myTarget) /* ptr wrapped around: pin to U_MAX_PTR */
/* Pin the limit to U_MAX_PTR. NULL check is for AS/400. */
if((myTargetLimit < myTarget) || (myTargetLimit == NULL))
myTargetLimit = (char*)U_MAX_PTR;
ucnv_fromUnicode(converter, &myTarget, myTargetLimit,

View file

@ -286,6 +286,9 @@ EOF
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
AS400*:OS400*:*:*)
echo os400-ibm${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
@ -949,6 +952,9 @@ EOF
*:OS/390:*:*)
echo ${UNAME_MACHINE}-ibm-os390${UNAME_RELEASE}
exit 0 ;;
*:OS400:*:*)
echo ${UNAME_MACHINE}-ibm-os400${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View file

@ -163,6 +163,10 @@ case $os in
os=-os390
basic_machine=s390-ibm
;;
-as400*)
os=
basic_machine=as400
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
@ -180,7 +184,7 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v)
| thumb | d10v | as400)
basic_machine=$basic_machine-unknown
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
@ -214,7 +218,7 @@ case $basic_machine in
| mipstx39-* | mipstx39el-* \
| f301-* | armv*-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | s390-* )
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | s390-*| os400-* )
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@ -796,6 +800,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
as400)
basic_machine=as400
os=-os400
;;
none)
basic_machine=none-none
os=-none
@ -856,6 +864,10 @@ case $basic_machine in
basic_machine=c4x-none
os=-coff
;;
as400*)
basic_machine=as400
os=-os400
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@ -942,6 +954,9 @@ case $os in
-os390)
os=-os390
;;
-os400*)
os=-os400
;;
-utek*)
os=-bsd
;;

View file

@ -0,0 +1,87 @@
## -*-makefile-*-
## OS400-specific setup (for cross build)
## Copyright (c) 1999-2000, International Business Machines Corporation and
## others. All Rights Reserved.
# Note: 'LIBICU' would be set to 'libicu-' for unix builds.
LIBICU = libicu
GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
## Commands to compile
COMPILE.c= $(CC) $(DEFS) -DOS400 -D_MULTI_THREADED $(CPPFLAGS) $(CFLAGS) -c
COMPILE.cc= $(CXX) $(DEFS) -DOS400 -D_MULTI_THREADED $(CPPFLAGS) $(CXXFLAGS) -c
## Commands to link
## We need to use the C++ linker, even when linking C programs, since
## our libraries contain C++ code (C++ static init not called)
LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
## Commands to make a shared library
SHLIB.c= ld -v -qOPTION='*DUPPROC *DUPVAR'
SHLIB.cc= ld -v -qOPTION='*DUPPROC *DUPVAR'
AR = qar
ARFLAGS = -cuv
## Compiler switch to embed a runtime search path
LD_RPATH= -I
LD_RPATH_PRE= -I
## object suffix
TO= o
## Shared object suffix
SO= o
## Platform command to remove or move executable target
RMV = del
INSTALL-S = cp -fph
## Link commands to link to ICU service programs
LIBICU-UC = $(top_srcdir)/common/libicuuc.o
LIBICU-I18N = $(top_srcdir)/i18n/libicui18n.o
LIBCTESTFW = $(top_srcdir)/tools/ctestfw/libctestfw.o
LIBICU-TOOLUTIL = $(top_srcdir)/tools/toolutil/libicutoolutil.o
## Special OS400 rules
## Build archive from shared object
%.a : %.o
$(AR) $(ARFLAGS) $@ $<
## Build import list from export list
%.e : %.exp
@echo "Building an import list for $<"
@$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
## Compilation rules
%.o : $(srcdir)/%.c
$(COMPILE.c) -o $@ $<
%.o : $(srcdir)/%.cpp
$(COMPILE.cc) -o $@ $<
%.qwobj : $(srcdir)/%.c
$(COMPILE.c) -o $@ $<
%.qwobj : $(srcdir)/%.cpp
$(COMPILE.cc) -o $@ $<
## Dependency rules
%.d : %.u
# @$(SHELL) -ec 'cat $< \
# | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
# [ -s $@ ] || rm -f $@ ; rm -f $<'
%.u : $(srcdir)/%.c
@echo "Generating dependency information for $<"
# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
# @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1'
%.u : $(srcdir)/%.cpp
@echo "Generating dependency information for $<"
# @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1'
# @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1'
## End OS400-specific setup