Automatic date update in version.in
[platform/upstream/binutils.git] / gdb / remote-fileio.c
index 2f9d644..451c3b1 100644 (file)
@@ -1,6 +1,6 @@
 /* Remote File-I/O communications
 
-   Copyright (C) 2003-2013 Free Software Foundation, Inc.
+   Copyright (C) 2003-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 /* See the GDB User Guide for details of the GDB remote protocol.  */
 
 #include "defs.h"
-#include "gdb_string.h"
 #include "gdbcmd.h"
 #include "remote.h"
 #include "gdb/fileio.h"
 #include "gdb_wait.h"
-#include "gdb_stat.h"
-#include "exceptions.h"
+#include <sys/stat.h>
 #include "remote-fileio.h"
 #include "event-loop.h"
 #include "target.h"
 #include "filenames.h"
+#include "filestuff.h"
 
 #include <fcntl.h>
 #include <sys/time.h>
@@ -512,7 +511,7 @@ remote_fileio_sig_exit (void)
 static void
 async_remote_fileio_interrupt (gdb_client_data arg)
 {
-  deprecated_throw_reason (RETURN_QUIT);
+  quit ();
 }
 
 static void
@@ -639,7 +638,7 @@ remote_fileio_func_open (char *buf)
     }
 
   remote_fio_no_longjmp = 1;
-  fd = open (pathname, flags, mode);
+  fd = gdb_open_cloexec (pathname, flags, mode);
   if (fd < 0)
     {
       remote_fileio_return_errno (-1);