sim: drop core libiberty.h include
[deliverable/binutils-gdb.git] / sim / common / sim-io.c
index 1114ec6138ec799e4307e8a52078d1d128e9e261..e09a4af7ba2e4dd66935971d09ab874b4914b47a 100644 (file)
@@ -1,6 +1,6 @@
 /* The common simulator framework for GDB, the GNU Debugger.
 
-   Copyright 2002-2014 Free Software Foundation, Inc.
+   Copyright 2002-2021 Free Software Foundation, Inc.
 
    Contributed by Andrew Cagney and Red Hat.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "sim-io.h"
+#include "sim/callback.h"
 #include "targ-vals.h"
 
 #include <errno.h>
 #include <unistd.h>
 #endif
 
+#include <stdlib.h>
+
+#undef open
+
 /* Define the rate at which the simulator should poll the host
    for a quit. */
 #ifndef POLL_QUIT_INTERVAL
@@ -66,11 +73,10 @@ sim_io_unlink (SIM_DESC sd,
 }
 
 
-long
-sim_io_time (SIM_DESC sd,
-            long *t)
+int64_t
+sim_io_time (SIM_DESC sd)
 {
-  return STATE_CALLBACK (sd)->time (STATE_CALLBACK (sd), t);
+  return STATE_CALLBACK (sd)->time (STATE_CALLBACK (sd));
 }
 
 
@@ -210,10 +216,10 @@ sim_io_open (SIM_DESC sd,
 }
 
 
-int
+int64_t
 sim_io_lseek (SIM_DESC sd,
              int fd,
-             long off,
+             int64_t off,
              int way)
 {
   return STATE_CALLBACK (sd)->lseek (STATE_CALLBACK (sd), fd, off, way);
This page took 0.02378 seconds and 4 git commands to generate.