From ff5826a106d55bb58ca0f56adc081784609f3874 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 12 Oct 2007 18:26:47 +0000 Subject: Fix wimaxasncp compilation under Windows. Rename a macro that's defined by the platform SDK, cast an int, and use the top-level Makefile.nmake.inc to build wimaxasncp_dict.{c|obj}. svn path=/trunk/; revision=23165 --- plugins/wimaxasncp/Makefile.nmake | 10 ++++------ plugins/wimaxasncp/wimaxasncp_dict.l | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/wimaxasncp') diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake index 6e4d3ebce6..2fdae31fcd 100644 --- a/plugins/wimaxasncp/Makefile.nmake +++ b/plugins/wimaxasncp/Makefile.nmake @@ -6,6 +6,7 @@ include ..\..\config.nmake include moduleinfo.nmake +include ..\..\Makefile.nmake.inc include Makefile.common @@ -90,13 +91,10 @@ plugin.c: $(DISSECTOR_SRC) ../../tools/make-dissector-reg.py ../../tools/make-di !ENDIF -RUNLEX=..\..\tools\runlex.sh +RUNLEX = ..\..\tools\runlex.sh -wimaxasncp.obj : wimaxasncp_dict.c -wimaxasncp_dict_lex.h: wimaxasncp_dict.c - -wimaxasncp_dict.c: wimaxasncp_dict.l - $(RUNLEX) -o wimaxasncp_dict.c wimaxasncp_dict.l +wimaxasncp_dict_lex.h : wimaxasncp_dict.c +wimaxasncp_dict.obj : wimaxasncp_dict.c clean: rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb \ diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l index 8b08d5b54b..3be6a524ee 100644 --- a/plugins/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/wimaxasncp/wimaxasncp_dict.l @@ -83,7 +83,7 @@ typedef struct entity_t { #define ATTR_UINT16(cont) do { D(("attr_uint16 " #cont "\t" )); attr_uint16 = &(cont); yy_push_state(GET_UINT16_ATTR); } while(0) #define ATTR_STR(cont) do { D(("attr_str " #cont "\t" )); attr_str = &(cont); yy_push_state(GET_ATTR); } while(0) #define ATTR_DECODER(cont) do { D(("attr_decoder " #cont "\t" )); attr_uint = &(cont); yy_push_state(GET_DECODER_ATTR); } while(0) -#define IGNORE() do { D(("ignore: %s\t",yytext)); yy_push_state(IGNORE_ATTR); } while(0) +#define WIMAXASNCP_IGNORE() do { D(("ignore: %s\t",yytext)); yy_push_state(IGNORE_ATTR); } while(0) #define D(args) wimaxasncp_dict_debug args @@ -322,7 +322,7 @@ decoder_attr decoder=\042 } {number} { - *attr_uint16 = strtol(yytext,NULL,0); + *attr_uint16 = (gint16) strtol(yytext,NULL,0); D(("%s\n",yytext);); attr_uint16 = NULL; BEGIN END_ATTR; @@ -431,7 +431,7 @@ decoder_attr decoder=\042 yyterminate(); } -{ignored_attr} IGNORE(); +{ignored_attr} WIMAXASNCP_IGNORE(); . ; -- cgit v1.2.3