prepare for EBCDIC target environments (with -E option)

this differs from EBCDIC build hosts which can be autodetected
This commit is contained in:
tg 2017-04-28 00:27:48 +00:00
parent d3ffed0331
commit 884153131d

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.716 2017/04/12 18:33:22 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.717 2017/04/28 00:27:48 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016, 2017
@ -496,6 +496,7 @@ last=
tfn=
legacy=0
textmode=0
ebcdic=0
for i
do
@ -519,6 +520,9 @@ do
:-c)
last=c
;;
:-E)
ebcdic=1
;;
:-G)
echo "$me: Do not call me with '-G'!" >&2
exit 1
@ -603,6 +607,13 @@ else
add_cppflags -DMKSH_LEGACY_MODE
fi
if test $ebcdic = 0; then
check_categories="$check_categories shell:ebcdic-no shell:ascii-yes"
else
check_categories="$check_categories shell:ebcdic-yes shell:ascii-no"
add_cppflags -DMKSH_EBCDIC
fi
if test $textmode = 0; then
check_categories="$check_categories shell:textmode-no shell:binmode-yes"
else