From 0af6db78f3e1c1d36a2160cbfc35ccb16cb4ce00 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 17 Feb 2005 12:59:59 +0000 Subject: [PATCH] * deflex.l (YY_NO_UNPUT): Define. * rclex.l (YY_NO_UNPUT): Define. * rcparse.y (null_unichar): New static var. (res_null_text): Use it rather than attempting to init from wchar_t. * windres.c: Include assert.h and time.h before getopt.h. Include config.h and unistd.h too. --- binutils/ChangeLog | 9 +++++++++ binutils/deflex.l | 2 ++ binutils/rclex.l | 2 ++ binutils/rcparse.y | 3 ++- binutils/windres.c | 8 ++++++-- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3363eb620e7..98fbca8f554 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,12 @@ +2005-02-17 Alan Modra + + * deflex.l (YY_NO_UNPUT): Define. + * rclex.l (YY_NO_UNPUT): Define. + * rcparse.y (null_unichar): New static var. + (res_null_text): Use it rather than attempting to init from wchar_t. + * windres.c: Include assert.h and time.h before getopt.h. + Include config.h and unistd.h too. + 2005-02-15 Nick Clifton * nlmconv.c: Provide a full prototype for the localtime() function diff --git a/binutils/deflex.l b/binutils/deflex.l index bdf15d3a12e..b86748a073a 100644 --- a/binutils/deflex.l +++ b/binutils/deflex.l @@ -27,6 +27,8 @@ #include "defparse.h" #include "dlltool.h" +#define YY_NO_UNPUT + int linenumber; %} diff --git a/binutils/rclex.l b/binutils/rclex.l index 2735cc18aca..0afad4d532b 100644 --- a/binutils/rclex.l +++ b/binutils/rclex.l @@ -32,6 +32,8 @@ #include +#define YY_NO_UNPUT + /* Whether we are in rcdata mode, in which we returns the lengths of strings. */ diff --git a/binutils/rcparse.y b/binutils/rcparse.y index 98ad3c8b58b..c913022f9af 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -54,10 +54,11 @@ static unsigned long base_style; static unsigned long default_style; static unsigned long class; static struct res_id res_text_field; +static unichar null_unichar; /* This is used for COMBOBOX, LISTBOX and EDITTEXT which do not allow resource 'text' field in control definition. */ -static const struct res_id res_null_text = { 1, {{0, L""}}}; +static const struct res_id res_null_text = { 1, {{0, &null_unichar}}}; %} diff --git a/binutils/windres.c b/binutils/windres.c index 5b7fdf1b17f..b6006111d71 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -34,6 +34,12 @@ * The res2coff program, written by Pedro A. Aranda . */ +#include "config.h" +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include #include "bfd.h" #include "getopt.h" #include "bucomm.h" @@ -41,8 +47,6 @@ #include "safe-ctype.h" #include "obstack.h" #include "windres.h" -#include -#include /* Used by resrc.c at least. */ -- 2.30.2