unbreak on mips platforms, which already have the 'mips' symbol defined.

ok sthen@ (MAINTAINER)
This commit is contained in:
jasper 2013-04-27 15:11:57 +00:00
parent ad87c9f6d7
commit 0e268858fa
2 changed files with 59 additions and 1 deletions

View File

@ -1,7 +1,8 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/04/18 15:08:17 sthen Exp $
# $OpenBSD: Makefile,v 1.2 2013/04/27 15:11:57 jasper Exp $
COMMENT= curses GDB interface
DISTNAME= cgdb-0.6.7
REVISION= 0
CATEGORIES= devel
HOMEPAGE= http://cgdb.me/

View File

@ -0,0 +1,57 @@
$OpenBSD: patch-lib_gdbmi_gdbmi_parser_c,v 1.1 2013/04/27 15:11:57 jasper Exp $
mips platforms already have 'mips' defined, resulting in:
error: expected ',' or '...' before numeric constant
--- lib/gdbmi/gdbmi_parser.c.orig Sat Apr 27 17:04:46 2013
+++ lib/gdbmi/gdbmi_parser.c Sat Apr 27 17:05:35 2013
@@ -18,7 +18,7 @@ extern int gdbmi_lineno;
struct gdbmi_parser {
char *last_error;
- gdbmi_pstate *mips;
+ gdbmi_pstate *pmips;
gdbmi_pdata_ptr pdata_ptr;
};
@@ -35,7 +35,7 @@ gdbmi_parser_ptr gdbmi_parser_create(void)
}
/* Create a new parser instance */
- parser->mips = gdbmi_pstate_new();
+ parser->pmips = gdbmi_pstate_new();
if (!parser) {
fprintf(stderr, "%s:%d", __FILE__, __LINE__);
return NULL;
@@ -62,10 +62,10 @@ int gdbmi_parser_destroy(gdbmi_parser_ptr parser)
parser->last_error = NULL;
}
- if (parser->mips) {
+ if (parser->pmips) {
/* Free the parser instance */
- gdbmi_pstate_delete(parser->mips);
- parser->mips = NULL;
+ gdbmi_pstate_delete(parser->pmips);
+ parser->pmips = NULL;
}
if (parser->pdata_ptr) {
@@ -111,7 +111,7 @@ gdbmi_parser_parse_string(gdbmi_parser_ptr parser,
if (pattern == 0)
break;
mi_status =
- gdbmi_push_parse(parser->mips, pattern, NULL,
+ gdbmi_push_parse(parser->pmips, pattern, NULL,
parser->pdata_ptr);
} while (mi_status == YYPUSH_MORE);
@@ -163,7 +163,7 @@ gdbmi_parser_parse_file(gdbmi_parser_ptr parser,
if (pattern == 0)
break;
mi_status =
- gdbmi_push_parse(parser->mips, pattern, NULL,
+ gdbmi_push_parse(parser->pmips, pattern, NULL,
parser->pdata_ptr);
} while (mi_status == YYPUSH_MORE);