On Mon, Jul 29, 2013 at 11:23:17AM +0200, ольга крыжановская wrote: > I can confirm the problem on Suse Linux 12.3, but not on Solaris 11/i386. > > I think the magic switch in AST echo which selects the proper > emulation mode (BSD, SYSV) is broken. > > Glenn, how again can I affect the UNIVERSE setting in AST? There was a > magic, hidden, environment variable to do it.
To make it more clear, the ksh93u 2012-08-01 is compiled with
UNIVERSE=att
and some patches to make sure that this survices the autoconfigure.
Also there is patch for the echo/print builtin to have the common
options known from the bash around (regardless ATT).
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
--- src/cmd/ksh93/bltins/print.c
+++ src/cmd/ksh93/bltins/print.c 2008-05-05 11:20:21.000000000 +0000
@@ -105,7 +105,11 @@ static char* nullarg[] = { 0, 0 };
{
static char bsd_univ;
struct print prdata;
- prdata.options = sh_optecho+5;
+# if defined(__linux__)
+ prdata.options = sh_optecho;
+# else
+ prdata.options = sh_optecho + 5;
+# endif
prdata.raw = prdata.echon = 0;
prdata.sh = context->shp;
NOT_USED(argc);
@@ -118,7 +122,52 @@ static char* nullarg[] = { 0, 0 };
prdata.sh->universe = 1;
}
if(!bsd_univ)
+ {
+# if defined(__linux__)
+ char *opt = argv[1];
+ while ((opt = argv[1]) && (*opt == '-'))
+ {
+ int c;
+
+ opt++;
+
+ for (c = 0; opt[c]; c++)
+# if !SHOPT_ECHOE
+ if (strchr("neE", opt[c]) == 0)
+# else
+ if (strchr("n", opt[c]) == 0)
+# endif /* SHOPT_ECHOE */
+ break;
+
+ if (*opt == 0 || opt[c])
+ break;
+
+ while ((c = *opt++))
+ {
+ switch (c) {
+ case 'n':
+ prdata.echon = 1;
+ break;
+# if !SHOPT_ECHOE
+ case 'e':
+ prdata.raw = 0;
+ break;
+ case 'E':
+ prdata.raw = 1;
+ break;
+# endif /* SHOPT_ECHOE */
+ default:
+ goto out;
+ break;
+ }
+ }
+
+ argv++;
+ }
+ out:
+# endif
return(b_print(0,argv,(Shbltin_t*)&prdata));
+ }
prdata.options = sh_optecho;
prdata.raw = 1;
while(argv[1] && *argv[1]=='-')
pgpXcWruwM6d8.pgp
Description: PGP signature
_______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
