change default behavior of 'read' builtin in ash

egor duda deo@logos-m.ru
Sat Oct 27 09:18:00 GMT 2001


Hi!

Saturday, 27 October, 2001 Corinna Vinschen cygwin-apps@cygwin.com wrote:

CV> On Fri, Oct 26, 2001 at 04:49:18PM +0400, egor duda wrote:
>> Hi!
>> 
>>   currently 'read' builtin in ash requires -e option to make it treat
>> backslashes as escapes. current BSD ash and SUSv2 do this by default
>> and use -r option to turn this special treatment off. patch attached.
>> 
>> after this patch, libiberty testsuite passes all test on cygwin :)

CV> There's a problem with that patch.  At one point it removes the
CV> `#ifndef SMALL' while at another important point it leaves the
CV> original SMALL handling in the code:

CV>         #ifdef SMALL
CV>                 nextopt("");
CV>         #else
CV>                 while ((i = nextopt("erp:t:")) != '\0') {
CV>                 [...]

CV> Did you compile ash w/o -DSMALL for Cygwin?  The Cygwin version is
CV> compiled that way.

with -DSMALL backslashes are always treated by default, i.e., as
escapes. no '-r' option available. when as compiled without -DSMALL,
user can supply -r option to 'read' and make it process input as
"raw". i don't see anything wrong here.

as for compiling w/o -DSMALL, i can't even compile it because cd.c
includes show.h when compiled without -DSMALL and this file is missing
from src package.

i think i can add choice of compiling with/without -DSMALL as
configure option, adding, say, --enable-small option to configure

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



More information about the Cygwin-apps mailing list