gdbserver/proc-service.c: Change CORE_ADDR cast to uintptr_t
[deliverable/binutils-gdb.git] / gdb / ser-base.c
index d07dcf3e4809d8610498ddb07342191f46ccb765..a09fbdeaa336abe59441fd29bb3ba1b30ae20402 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic serial interface functions.
 
-   Copyright (C) 1992-2013 Free Software Foundation, Inc.
+   Copyright (C) 1992-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,9 +23,7 @@
 #include "event-loop.h"
 
 #include "gdb_select.h"
-#include <string.h>
-#include "gdb_assert.h"
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 #ifdef USE_WIN32API
 #include <winsock2.h>
 #endif
@@ -155,7 +153,7 @@ run_async_handler_and_reschedule (struct serial *scb)
 static void
 fd_event (int error, void *context)
 {
-  struct serial *scb = context;
+  struct serial *scb = (struct serial *) context;
   if (error != 0)
     {
       scb->bufcnt = SERIAL_ERROR;
@@ -192,7 +190,7 @@ fd_event (int error, void *context)
 static void
 push_event (void *context)
 {
-  struct serial *scb = context;
+  struct serial *scb = (struct serial *) context;
 
   scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
   run_async_handler_and_reschedule (scb);
@@ -442,7 +440,7 @@ ser_base_readchar (struct serial *scb, int timeout)
 int
 ser_base_write (struct serial *scb, const void *buf, size_t count)
 {
-  const char *str = buf;
+  const char *str = (const char *) buf;
   int cc;
 
   while (count > 0)
@@ -498,14 +496,14 @@ serial_ttystate
 ser_base_get_tty_state (struct serial *scb)
 {
   /* Allocate a dummy.  */
-  return (serial_ttystate) XMALLOC (int);
+  return (serial_ttystate) XNEW (int);
 }
 
 serial_ttystate
 ser_base_copy_tty_state (struct serial *scb, serial_ttystate ttystate)
 {
   /* Allocate another dummy.  */
-  return (serial_ttystate) XMALLOC (int);
+  return (serial_ttystate) XNEW (int);
 }
 
 int
@@ -543,6 +541,14 @@ ser_base_setstopbits (struct serial *scb, int num)
   return 0;                    /* Never fails!  */
 }
 
+/* Implement the "setparity" serial_ops callback.  */
+
+int
+ser_base_setparity (struct serial *scb, int parity)
+{
+  return 0;                    /* Never fails!  */
+}
+
 /* Put the SERIAL device into/out-of ASYNC mode.  */
 
 void
This page took 0.028949 seconds and 4 git commands to generate.