/* Serial interface for local (hardwired) serial ports on Windows systems
- Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdb_assert.h"
#include "gdb_string.h"
+#include "command.h"
+
void _initialize_ser_windows (void);
struct ser_windows_state
return -1;
}
- scb->fd = _open_osfhandle ((long) h, O_RDWR);
+ scb->fd = _open_osfhandle ((intptr_t) h, O_RDWR);
if (scb->fd < 0)
{
errno = ENOENT;
SetEvent(state->have_stopped);
}
+ return 0;
}
static int
SetEvent (state->have_stopped);
}
+ return 0;
}
static DWORD WINAPI
SetEvent (state->have_stopped);
}
+ return 0;
}
static void
{
struct pipe_state *ps;
FILE *pex_stderr;
+ char **argv;
+ struct cleanup *back_to;
+
+ if (name == NULL)
+ error_no_arg (_("child command"));
+
+ argv = gdb_buildargv (name);
+ back_to = make_cleanup_freeargv (argv);
- char **argv = buildargv (name);
- struct cleanup *back_to = make_cleanup_freeargv (argv);
if (! argv[0] || argv[0][0] == '\0')
error ("missing child command");
-
ps = make_pipe_state ();
make_cleanup (cleanup_pipe_state, ps);