(remote_fileio_func_fstat) [HAVE_STRUCT_STAT_ST_BLOCKS]: Support
systems that don't have `st_blocks' member in `struct stat'.
* configure.in (HAVE_STRUCT_STAT_ST_BLOCKS): Ditto.
* remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H.
* Makefile.in (remote-fileio.o): Update dependencies.
* remote-fileio.c: Include "gdb_wait.h" and "gdb_stat.h". Do not
include <setjmp.h>, or <sys/types.h> conditional on USG.
(remote_fio_jmp_buf): Delete global variable.
* remote-fileio.c: New file implementing the remote File-I/O protocol.
* remote-fileio.h: New header file defining remote File-I/O interface.
* remote.c (remote_write_bytes, remote_read_bytes): Remove
static storage class.
(remote_wait, remote_async_wait): Call remote_fileio_request() on
'F' packet.
(_initialize_remote): Call initialize_remote_fileio().
* remote.h: Declare remote_write_bytes() and remote_read_bytes().
* Makefile.in (REMOTE_OBS): Add remote-fileio.o
(SFILES): Add remote-fileio.c.
Add dependencies for building remote-fileio.o. Add remote-fileio.h to
dependencies for building remote.o.
* defs.h: Declare gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
* main.c: New ui_file gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
(captured_main): Initialize new ui_files.
* ui-file.c: Add read and fgets input functions.
(ui_file_new): set ui_file_fputs and ui_file_read to null functions.
(null_file_read): New function.
(ui_file_read): New function.
(set_ui_file_read): New function.
(stdio_file_read): New function.
* ui-file.h: New type ui_file_read_ftype.
(set_ui_file_read): Declare.
(ui_file_read): Declare.