From: Manu <ma...@wa...> - 2002-10-29 22:59:16
|
Wu Yongwei wrote: > Thank Manu for doing the port for MinGW. I would like to contribute my > cents. > > All Win32 native grep.exe (not counting the Cygwin and MSYS versions) I > used has the problem that "grep pattern -" does not work on my Windows > 2000 box. I don't really see what you mean :) Can you give an example command line. I'll check if the problem also occurs under Win9x. > It would report "grep: (standard input): Not enough space". > Today I found the problem tracing the source. It seems a Windows > (MSVCRT; but MSVC 6 with static lib has the problem too) bug -- My > simplest test case shows that "read(0, buf, n)" will return -1 when n is > greater than around 30700. You may test on your PC but I don't know how > widespread the problem is. > > I thus modified the grep source. Modifying the value of INITIAL_BUFSIZE > from 32768 to 16384 (on l. 216 of grep.c) will do the trick. > > Hope you will like it. Yes, I hope we will merge our changes. BTW, what do you think of the idea I'm submitting: To archive patches to build GNU packages with MSYS/MinGW. And that way, sharing experiences, submit patches to the packages maintainers, etc... Anyway, trying to collect interesting patches published on mailing lists. Manu. |