public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [ANNOUNCEMENT] Updated: bash-2.05b-4
@ 2002-09-08  7:53 Corinna Vinschen
  2002-09-09 23:52 ` Dan Vasaru
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2002-09-08  7:53 UTC (permalink / raw)
  To: cygwin

I've updated the version of bash in the Cygwin distro to 2.05b-4.

This version disables an old Cygwin hack which disallows seeking on
input files.  This -4 version should be slightly faster in scripting.


To update your installation, click on the "Install Cygwin now" link on  
the http://sources.redhat.com/cygwin web page.  This downloads setup.exe
to your system.  The, run setup and answer all of the questions.

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

Note that we do not allow downloads from sources.redhat.com (aka
cygwin.com) due to bandwidth limitations.  This means that you will need
to find a mirror which has this update.  You might have to wait as much
as 24 hours to find a mirror with the updated version of cygwin on it.
Be patient.

If you have questions or comments, please send them to the Cygwin  
mailing list at: cygwin@cygwin.com .  I would appreciate it if you would
use this mailing list rather than emailing me directly.

If you want to make a point or ask a question, the Cygwin mailing list   
is the appropriate place.  This includes ideas and comments about the
setup utility or Cygwin in general.

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain.com@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

I implore you to READ this information before sending email about how
you "tried everything" to unsubscribe.  In 100% of the cases where 
people were unable to unsubscribe, the problem was that they hadn't  
actually read and comprehended the unsubscribe instructions.

If you need to unsubscribe from cygwin-announce or any other mailing
list, reading the instructions at the above URL is guaranteed to
provide you with the info that you need.

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ANNOUNCEMENT] Updated: bash-2.05b-4
  2002-09-08  7:53 [ANNOUNCEMENT] Updated: bash-2.05b-4 Corinna Vinschen
@ 2002-09-09 23:52 ` Dan Vasaru
  2002-09-10  0:19   ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Vasaru @ 2002-09-09 23:52 UTC (permalink / raw)
  To: cygwin

Corrina,

I'll give this a go in gdb as it seems to have caused problems for some
users.
Did you just remove the fd_is_seekable ifdef  ?

Dan

-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
Of Corinna Vinschen
Sent: Sunday, September 08, 2002 2:09 PM
To: cygwin@cygwin.com
Subject: [ANNOUNCEMENT] Updated: bash-2.05b-4


I've updated the version of bash in the Cygwin distro to 2.05b-4.

This version disables an old Cygwin hack which disallows seeking on
input files.  This -4 version should be slightly faster in scripting.
[...]


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ANNOUNCEMENT] Updated: bash-2.05b-4
  2002-09-09 23:52 ` Dan Vasaru
@ 2002-09-10  0:19   ` Corinna Vinschen
  2002-09-10  4:25     ` dvasaru
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2002-09-10  0:19 UTC (permalink / raw)
  To: cygwin

On Tue, Sep 10, 2002 at 08:01:00AM +0200, Dan Vasaru wrote:
> Corrina,
> 
> I'll give this a go in gdb as it seems to have caused problems for some
> users.
> Did you just remove the fd_is_seekable ifdef  ?

Yes, I announced -5 yesterday, reverting that again.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ANNOUNCEMENT] Updated: bash-2.05b-4
  2002-09-10  0:19   ` Corinna Vinschen
@ 2002-09-10  4:25     ` dvasaru
  0 siblings, 0 replies; 4+ messages in thread
From: dvasaru @ 2002-09-10  4:25 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

Quoting Corinna Vinschen <corinna-cygwin@cygwin.com>:

> On Tue, Sep 10, 2002 at 08:01:00AM +0200, Dan Vasaru wrote:
> > I'll give this a go in gdb as it seems to have caused problems for some
> > users. Did you just remove the fd_is_seekable ifdef  ?
> Yes, I announced -5 yesterday, reverting that again.

The problem is with the way text seeks are (not) implemented in cygwin: lseek in text files do not adjust for skipped CRs. This is also the strategy MS is using in their CRT, so it may be the most MSVCRT/CYGWIN compatible solution.

So it seems that applications that use lseek on text files should handle CRLF translation by themselves, at least for now.

In the case of bash, CRLF translation seems to have been implemented by the DJGPP port.

I just removed (almost) all __CYGWIN__  textmode translation related #ifdefs, and enabled the DJGPP CR removal hack in buffered_getchar ().

Preliminary testing shows the new bash to work on both CRLF and LF files.
Files are no longer opened in O_TEXT mode, but CR's are stripped in buffered_getchar.
In case anyone is interested in testing out the new bash, I'm attaching a diff to bash-2.05b-3-src.tar.bz2, and I can provide a prebuilt bash.exe.

dan


[-- Attachment #2: bashdiff --]
[-- Type: application/octet-stream, Size: 2380 bytes --]

diff -rc bash-2.05b-3/builtins/evalfile.c bash-2.05b-6/builtins/evalfile.c
*** bash-2.05b-3/builtins/evalfile.c	Thu Feb 21 21:08:52 2002
--- bash-2.05b-6/builtins/evalfile.c	Tue Sep 10 12:43:19 2002
***************
*** 121,130 ****
        return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
      }      
  
- #if defined (__CYGWIN__) && defined (O_TEXT)
-   setmode (fd, O_TEXT);
- #endif
- 
    string = (char *)xmalloc (1 + file_size);
    result = read (fd, string, file_size);
    string[result] = '\0';
--- 121,126 ----
diff -rc bash-2.05b-3/input.c bash-2.05b-6/input.c
*** bash-2.05b-3/input.c	Mon Sep 10 19:26:48 2001
--- bash-2.05b-6/input.c	Tue Sep 10 13:10:45 2002
***************
*** 321,331 ****
  }
  
  /* Return 1 if a seek on FD will succeed. */
- #ifndef __CYGWIN__
  #  define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0)
- #else
- #  define fd_is_seekable(fd) 0
- #endif /* __CYGWIN__ */
  
  /* Take FD, a file descriptor, and create and return a buffered stream
     corresponding to it.  If something is wrong and the file descriptor
--- 321,327 ----
***************
*** 445,459 ****
        return (EOF);
      }
  
- #if defined (__CYGWIN__)
-   /* If on cygwin, translate \r\n to \n. */
-   if (nr >= 2 && bp->b_buffer[nr - 2] == '\r' && bp->b_buffer[nr - 1] == '\n')
-     {
-       bp->b_buffer[nr - 2] = '\n';
-       nr--;
-     }
- #endif
- 
    bp->b_used = nr;
    bp->b_inputp = 0;
    return (bp->b_buffer[bp->b_inputp++] & 0xFF);
--- 441,446 ----
***************
*** 500,506 ****
  int
  buffered_getchar ()
  {
! #if !defined (DJGPP)
    return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
  #else
    /* On DJGPP, ignore \r. */
--- 487,493 ----
  int
  buffered_getchar ()
  {
! #if !defined (DJGPP) && !defined(__CYGWIN__)
    return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
  #else
    /* On DJGPP, ignore \r. */
diff -rc bash-2.05b-3/shell.c bash-2.05b-6/shell.c
*** bash-2.05b-3/shell.c	Mon Jul  1 17:27:11 2002
--- bash-2.05b-6/shell.c	Tue Sep 10 12:43:19 2002
***************
*** 1343,1352 ****
       not match with ours. */
    fd = move_to_high_fd (fd, 0, -1);
  
- #if defined (__CYGWIN__) && defined (O_TEXT)
-   setmode (fd, O_TEXT);
- #endif
- 
  #if defined (BUFFERED_INPUT)
    default_buffered_input = fd;
    SET_CLOSE_ON_EXEC (default_buffered_input);
--- 1343,1348 ----

[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-10 11:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-08  7:53 [ANNOUNCEMENT] Updated: bash-2.05b-4 Corinna Vinschen
2002-09-09 23:52 ` Dan Vasaru
2002-09-10  0:19   ` Corinna Vinschen
2002-09-10  4:25     ` dvasaru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).