This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/ob] Restore Windows host builds
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 9 Oct 2008 02:14:51 +0100
- Subject: [commit/ob] Restore Windows host builds
I've checked this in.
(error_no_arg is declared in command.h)
--
Pedro Alves
2008-10-09 Pedro Alves <pedro@codesourcery.com>
* ser-mingw.c: Include "command.h".
(pipe_windows_open): Declare locals at the beginning of the scope.
---
gdb/ser-mingw.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: src/gdb/ser-mingw.c
===================================================================
--- src.orig/gdb/ser-mingw.c 2008-10-09 02:03:14.000000000 +0100
+++ src/gdb/ser-mingw.c 2008-10-09 02:03:20.000000000 +0100
@@ -32,6 +32,8 @@
#include "gdb_assert.h"
#include "gdb_string.h"
+#include "command.h"
+
void _initialize_ser_windows (void);
struct ser_windows_state
@@ -817,12 +819,14 @@ pipe_windows_open (struct serial *scb, c
{
struct pipe_state *ps;
FILE *pex_stderr;
+ char **argv;
+ struct cleanup *back_to;
if (name == NULL)
error_no_arg (_("child command"));
- char **argv = gdb_buildargv (name);
- struct cleanup *back_to = make_cleanup_freeargv (argv);
+ argv = gdb_buildargv (name);
+ back_to = make_cleanup_freeargv (argv);
if (! argv[0] || argv[0][0] == '\0')
error ("missing child command");