|
From: Keith M. <kei...@to...> - 2007-03-13 09:53:01
|
Howard Chu wrote: > I just noticed [...] bash is never using buffered I/O; it's > reading script files one character at a time. This behavior is > totally unnecessary. > > This patch fixes the behavior: <patch> Index: input.c =================================================================== RCS file: /cvsroot/mingw/msys/packages/bash/3.1/input.c,v retrieving revision 1.2 diff -u -r1.2 input.c --- input.c 11 Aug 2006 17:21:39 -0000 1.2 +++ input.c 13 Mar 2007 02:00:16 -0000 @@ -337,7 +337,7 @@ #if ! (__CYGWIN__ || __MSYS__) # define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0) #else -# define fd_is_seekable(fd) 0 +# define fd_is_seekable(fd) 1 #endif /* __CYGWIN__ */ /* Take FD, a file descriptor, and create and return a buffered stream </patch> Thanks for the patch, Howard. This may have been better directed to the MinGW-dvlpr list, or even better still, the patch tracker, but no matter. I'll leave it to Cesar to approve; subject to that, you may commit it. Regards, Keith. |