/* Generic serial interface functions.
- Copyright (C) 1992-1996, 1998-2001, 2003-2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1992-2014 Free Software Foundation, Inc.
This file is part of GDB.
#include "event-loop.h"
#include "gdb_select.h"
-#include "gdb_string.h"
+#include <string.h>
#include "gdb_assert.h"
#include <sys/time.h>
#ifdef USE_WIN32API
}
int
-ser_base_write (struct serial *scb, const char *str, int len)
+ser_base_write (struct serial *scb, const void *buf, size_t count)
{
+ const char *str = buf;
int cc;
- while (len > 0)
+ while (count > 0)
{
- cc = scb->ops->write_prim (scb, str, len);
+ cc = scb->ops->write_prim (scb, str, count);
if (cc < 0)
return 1;
- len -= cc;
+ count -= cc;
str += cc;
}
return 0;