peek() can currently not be used there since it doesn't exist on Windows (that ought to be fixed, though).
Note that neither read(0,1) nor peek() is used in that spot in 7.7; only the !errno() check remains. That happened with this somewhat cryptic comment:
revision 1.222 date: 2006/05/31 18:34:06; author: grubba; state: Exp; lines: +2 -4 peek() doesn't do what most people think it does...
What is it that most people have missed about peek()? And more importantly, does the code work correctly without any check on the read buffer? Upon an error free remote close, won't errno() return zero there?