libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EBCDIC whitespace


From: Howard Chu
Subject: EBCDIC whitespace
Date: Fri, 26 Jul 2002 16:37:10 -0700

The SP2NL and NL2SP translations don't work for EBCDIC without tweaks:

--- ltmain.sh   11 Feb 2002 05:45:59 -0000      1.17
+++ ltmain.sh   26 Jul 2002 22:56:33 -0000      1.18
@@ -74,8 +74,17 @@
 # metacharacters that are still active within double-quoted strings.
 Xsed='sed -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo '' | od -x` in
+*15*) # EBCDIC based system
+  SP2NL='tr \100 \025'
+  NL2SP='tr \025 \100'
+  ;;
+*) # Assume ASCII based system
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+esac

 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]