#include "gdbsupport/gdb_wait.h"
#include <sys/stat.h>
#include "remote-fileio.h"
-#include "event-loop.h"
+#include "gdbsupport/event-loop.h"
#include "target.h"
#include "filenames.h"
#include "gdbsupport/filestuff.h"
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);
+ ret = gdb_stdtargin->read ((char *) buffer, 16383);
if (ret > 0 && (size_t)ret > length)
{
remaining_buf = (char *) xmalloc (ret - length);
xfree (buffer);
return;
case FIO_FD_CONSOLE_OUT:
- ui_file_write (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr,
- (char *) buffer, length);
- ui_file_flush (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr);
- ret = length;
+ {
+ ui_file *file = target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr;
+ file->write ((char *) buffer, length);
+ file->flush ();
+ ret = length;
+ }
break;
default:
ret = write (fd, buffer, length);
}
void
-initialize_remote_fileio (struct cmd_list_element *remote_set_cmdlist,
- struct cmd_list_element *remote_show_cmdlist)
+initialize_remote_fileio (struct cmd_list_element **remote_set_cmdlist,
+ struct cmd_list_element **remote_show_cmdlist)
{
add_cmd ("system-call-allowed", no_class,
set_system_call_allowed,
_("Set if the host system(3) call is allowed for the target."),
- &remote_set_cmdlist);
+ remote_set_cmdlist);
add_cmd ("system-call-allowed", no_class,
show_system_call_allowed,
_("Show if the host system(3) call is allowed for the target."),
- &remote_show_cmdlist);
+ remote_show_cmdlist);
}