+ /* Windows (at least XP and Server 2003) has difficulty
+ with large reads from consoles. If a handle is
+ backed by a real console device, overly large reads
+ from the handle will fail and set errno == ENOMEM.
+ On a Windows Server 2003 system where I tested,
+ reading 26608 bytes from the console was OK, but
+ anything above 26609 bytes would fail. The limit has
+ been observed to vary on different systems. So, we
+ limit this read to something smaller than that - by a
+ safe margin, in case the limit depends on system
+ resources or version. */
+ ret = ui_file_read (gdb_stdtargin, (char *) buffer, 16383);