From 9d1a8da0e35084d837dfe2fc0bd2964ee8ade5f1 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Sat, 9 Mar 2013 20:04:50 +0100 Subject: [PATCH] Add bootstrap_charset/BOOTSTRAP_CHARSET for non-ASCII architectures --- Configure | 65 ++++++++++++++++++++++++++--------------------- Cross/config.sh-arm-linux | 1 + NetWare/config.wc | 1 + Porting/Glossary | 4 +++ Porting/config.sh | 1 + config_h.SH | 5 ++++ configure.com | 1 + metaconfig.h | 1 + plan9/config_sh.sample | 1 + symbian/config.sh | 1 + uconfig.sh | 1 + uconfig64.sh | 1 + win32/config.ce | 1 + win32/config.gc | 1 + win32/config.vc | 1 + 15 files changed, 57 insertions(+), 29 deletions(-) diff --git a/Configure b/Configure index 6823cb7..6c71218 100755 --- a/Configure +++ b/Configure @@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Fri Feb 15 14:51:06 CET 2013 [metaconfig 3.5 PL0] +# Generated on Sat Mar 9 17:50:01 CET 2013 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 +$cat >try.c <<'EOM' +int main() +{ + if ('M'==0xd4) return 0; + return 1; +} +EOM + +case "$BOOTSTRAP_CHARSET" in + Y|y|define) bootstrap_charset=$define ;; + *) bootstrap_charset=$undef ;; +esac + +val=$undef +set try +if eval $compile_ok; then + if $run ./try; then + echo "You seem to speak EBCDIC." >&4 + val="$define" + else + echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 + fi +else + echo "I'm unable to compile the test program." >&4 + echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 +fi +$rm_try +set ebcdic +eval $setvar + : length of character in bytes. Is always 1, otherwise it isnt C : This used to be a test using sizeof charsize=1 @@ -19527,34 +19561,6 @@ EOCP esac done -: Determine if this is an EBCDIC system -echo " " -echo "Determining whether or not we are on an EBCDIC system..." >&4 -$cat >try.c <<'EOM' -int main() -{ - if ('M'==0xd4) return 0; - return 1; -} -EOM - -val=$undef -set try -if eval $compile_ok; then - if $run ./try; then - echo "You seem to speak EBCDIC." >&4 - val="$define" - else - echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 - fi -else - echo "I'm unable to compile the test program." >&4 - echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 -fi -$rm_try -set ebcdic -eval $setvar - : Check how to flush echo " " $cat >&4 <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol, if defined, indicates that this system uses * EBCDIC encoding. */ +/* BOOTSTRAP_CHARSET: + * This symbol, if defined, indicates that this system uses + * BOOTSTRAP_CHARSET + */ #$ebcdic EBCDIC /**/ +#$bootstrap_charset BOOTSTRAP_CHARSET /**/ /* Fpos_t: * This symbol holds the type used to declare file positions in libc. diff --git a/configure.com b/configure.com index 92045cd..f3535f9 100644 --- a/configure.com +++ b/configure.com @@ -5893,6 +5893,7 @@ $ WC "archname='" + archname + "'" $ WC "baserev='" + baserev + "'" $ WC "bin='" + bin + "'" $ WC "binexp='" + binexp + "'" +$ WC "bootstrap_charset='undef'" $ WC "builddir='" + builddir + "'" $ WC "byteorder='1234'" $ WC "castflags='0'" diff --git a/metaconfig.h b/metaconfig.h index 9813c2e..0a90c86 100644 --- a/metaconfig.h +++ b/metaconfig.h @@ -10,6 +10,7 @@ * they won't be available unless used. When new symbols are probed * in Configure, this is the way to force them into availability. * + * BOOTSTRAP_CHARSET * CHARBITS * HAS_ASCTIME64 * HAS_CTIME64 diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 9d05e43..71b1de7 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -48,6 +48,7 @@ bash='' bin='/usr/bin' binexp='/usr/bin' bison='bison' +bootstrap_charset='undef' byacc='byacc' byteorder='1234' c='' diff --git a/symbian/config.sh b/symbian/config.sh index d9a4c06..7f78957 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -15,6 +15,7 @@ asctime_r_proto='0' bin='\\system\\apps\\perl' bincompat5005='n' binexp='\\system\\apps\\perl' +bootstrap_charset='undef' byteorder='1234' castflags='0' cc='gcc' diff --git a/uconfig.sh b/uconfig.sh index d23c0da..80d1ec8 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -12,6 +12,7 @@ archname='unknown' asctime_r_proto='0' bin='/usr/local/bin' binexp='/usr/local/bin' +bootstrap_charset='undef' byteorder='1234' castflags='0' cf_by='root@localhost' diff --git a/uconfig64.sh b/uconfig64.sh index 1efdde5..839d08b 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -13,6 +13,7 @@ archname='unknown64' asctime_r_proto='0' bin='/usr/local/bin' binexp='/usr/local/bin' +bootstrap_charset='undef' byteorder='12345678' castflags='0' cf_by='root@localhost' diff --git a/win32/config.ce b/win32/config.ce index 39ec1f4..29071d5 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -35,6 +35,7 @@ bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bison='' +bootstrap_charset='undef' byacc='byacc' byteorder='1234' c='' diff --git a/win32/config.gc b/win32/config.gc index c51d30a..12b4296 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -35,6 +35,7 @@ bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bison='' +bootstrap_charset='undef' byacc='byacc' byteorder='1234' c='' diff --git a/win32/config.vc b/win32/config.vc index 0e975fd..6723444 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -35,6 +35,7 @@ bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bison='' +bootstrap_charset='undef' byacc='byacc' byteorder='1234' c='' -- 2.7.4