From: Wu Y. <ad...@ne...> - 2002-10-29 11:06:03
|
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. 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. Happy hacking, Wu Yongwei |