sim: unify bfd library dependency testing logic
[deliverable/binutils-gdb.git] / sim / mips / dv-tx3904sio.c
index 981e3d116929f14c70259eec0c97f9e661adcbcb..d447014014ccee44c65acf80604bf9ef49bbfc79 100644 (file)
@@ -1,6 +1,6 @@
 /*  This file is part of the program GDB, the GNU debugger.
     
-    Copyright (C) 1998, 1999, 2007 Free Software Foundation, Inc.
+    Copyright (C) 1998-2021 Free Software Foundation, Inc.
     Contributed by Cygnus Solutions.
     
     This program is free software; you can redistribute it and/or modify
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
 #include "dv-sockser.h"
 #include "sim-assert.h"
 
+#include <stdlib.h>
 
 /* DEVICE
 
@@ -579,10 +582,10 @@ tx3904sio_fifo_push(struct hw* me, struct tx3904sio_fifo* fifo, char it)
   if(fifo->size == fifo->used) /* full */
     {
       int next_size = fifo->size * 2 + 16;
-      char* next_buf = zalloc(next_size);
+      unsigned_1* next_buf = zalloc(next_size);
       memcpy(next_buf, fifo->buffer, fifo->used);
 
-      if(fifo->buffer != NULL) zfree(fifo->buffer);
+      if(fifo->buffer != NULL) free(fifo->buffer);
       fifo->buffer = next_buf;
       fifo->size = next_size;
     }
@@ -598,7 +601,7 @@ tx3904sio_fifo_reset(struct hw* me, struct tx3904sio_fifo* fifo)
   /* HW_TRACE ((me, "reset fifo")); */
   fifo->used = 0;
   fifo->size = 0;
-  zfree(fifo->buffer);
+  free(fifo->buffer);
   fifo->buffer = 0;
 }
 
This page took 0.023871 seconds and 4 git commands to generate.