This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] prevent build warnings from arlex.l and syslex.l
- From: John Marino <binutils at marino dot st>
- To: binutils at sourceware dot org
- Date: Tue, 05 Apr 2011 20:11:44 +0200
- Subject: [patch] prevent build warnings from arlex.l and syslex.l
Last week I patch I submitted that prevented ld/ldlex.l from emitting a
warning during the build process was committed:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ldlex.l.diff?cvsroot=src&r1=1.50&r2=1.51
It turns out that binutils/arlex.l and binutils/syslex.l have exactly
the same problem. The attached patch will silence these warnings on
those files too.
Regards,
John
diff --git a/binutils/arlex.l b/binutils/arlex.l
index aeac391..36e99ac 100644
--- a/binutils/arlex.l
+++ b/binutils/arlex.l
@@ -31,7 +31,9 @@
#include "libiberty.h"
#include "arparse.h"
+#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT
+#endif
extern int yylex (void);
diff --git a/binutils/syslex.l b/binutils/syslex.l
index 7e3f298..759462c 100644
--- a/binutils/syslex.l
+++ b/binutils/syslex.l
@@ -30,7 +30,9 @@
#endif
#include "sysinfo.h"
+#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT
+#endif
#ifndef yywrap
static int yywrap (void) { return 1; }
2011-04-05 John Marino <binutils@marino.st>
* arlex.l: prevent redefinition of YY_NO_UNPUT.
* syslex.l: likewise.