From 884153131d5c901f6e936a3a9f924cdda7f014c4 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 28 Apr 2017 00:27:48 +0000 Subject: [PATCH] prepare for EBCDIC target environments (with -E option) this differs from EBCDIC build hosts which can be autodetected --- Build.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Build.sh b/Build.sh index ca88a06..014e7bd 100644 --- a/Build.sh +++ b/Build.sh @@ -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