delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/05/18:39:46

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <009201c02f1d$9dfffbd0$c4acb018@home.com>
From: "Erik Nolte" <enolte AT campuspipeline DOT com>
To: <cygwin AT sources DOT redhat DOT com>
References: <004501c02f18$017884d0$c4acb018 AT home DOT com> <20001005181344 DOT B23631 AT cygnus DOT com>
Subject: Re: Bash patches
Date: Thu, 5 Oct 2000 16:43:00 -0600
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

Excellent suggestion!  The diff is now just a single line addition to
subst.c:


--- subst.c.old Thu Oct  5 14:46:28 2000
+++ subst.c     Thu Oct  5 16:35:00 2000
@@ -3307,6 +3307,8 @@ read_comsub (fd, quoted)
   char *istring, buf[128], *bufp;
   int bufn, istring_index, istring_size, c;

+  setmode( fd, O_TEXT );

   istring = (char *)NULL;
   istring_index = istring_size = bufn = 0;



I haven't seen setmode(fd,mode) in any other POSIX environment.  Have I just
missed it or is this a cywin specific thing?

- Erik

----- Original Message -----
From: "Chris Faylor" <cgf AT cygnus DOT com>
To: <cygwin AT sources DOT redhat DOT com>
Cc: <enolte AT campuspipeline DOT com>
Sent: October 05, 2000 16:13
Subject: Re: Bash patches


> By the way, I think you should probably just use the same mechanism that
> Cygwin uses to strip CRs.  Setting an input stream to O_TEXT is all that
> is required.  You do that one of three ways:
>
> open ("foo", O_RDONLY | O_TEXT);
> fopen ("foo", "rt");
> setmode (fd, O_TEXT);
>
> cgf
>
> On Thu, Oct 05, 2000 at 04:02:50PM -0600, Erik Nolte wrote:
> >I realize there is currently no bash maintainer, but how do I propose
> >patches and to whom do I send them in the interim?
> >
> >Below are patches to fix:
> >
> >(1) The backtick (command substitution) CR-LF problem I reported on
26Sep00
> >under the title "Has CR/LF and cat problem with textutils-2.0 been
solved?"
> >read_comsub() was modified in src/bash/subst.c to convert CR-LF into NL
> >immediately after the text is read from the command.
> >
> >(2) The cd/CDPATH erroneous echoing of the path for DOS absolute
pathnames.
> >This was reported on 26Sep00 under the title "Strange cd/CDPATH
behavior".
> >absolute_pathname() was modified in src/bash/general.c to treat
> >[A-Za-z]:[/\]* as absolute pathnames.
> >
> >I started with the source at
> >ftp://sources.redhat.com/pub/cygwin/latest/bash/bash-2.04-1-src.tar.gz
and
> >ran the diff as "diff -u -p original-file new-file".
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019