[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flex 2.5.31 filter.c bug and patch
From: |
Bruce Lilly |
Subject: |
flex 2.5.31 filter.c bug and patch |
Date: |
Wed, 16 Apr 2003 17:16:56 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 |
On some systems filter.c fails to compile because stdin and stdout are
never guaranteed to be lvalues (see ANSI C), but filter.c expects them
them to be lvalues:
filter.c(161) : error C2106: '=' : left operand must be l-value
filter.c(163) : error C2106: '=' : left operand must be l-value
filter.c(184) : error C2106: '=' : left operand must be l-value
A patch is attached.
*** filter.c.orig Tue Mar 25 11:39:08 2003
--- filter.c Wed Apr 16 15:45:00 2003
***************
*** 158,166 ****
int r;
/* setup streams again */
! if ((stdin = fdopen (0, "r")) == NULL)
flexfatal (_("fdopen(0) failed"));
! if ((stdout = fdopen (1, "w")) == NULL)
flexfatal (_("fdopen(1) failed"));
if ((r = chain->filter_func (chain)) == -1)
--- 158,166 ----
int r;
/* setup streams again */
! if (fdopen (0, "r") == NULL)
flexfatal (_("fdopen(0) failed"));
! if (fdopen (1, "w") == NULL)
flexfatal (_("fdopen(1) failed"));
if ((r = chain->filter_func (chain)) == -1)
***************
*** 181,187 ****
if (dup2 (pipes[1], 1) == -1)
flexfatal (_("dup2(pipes[1],1)"));
close (pipes[1]);
! if ((stdout = fdopen (1, "w")) == NULL)
flexfatal (_("fdopen(1) failed"));
return true;
--- 181,187 ----
if (dup2 (pipes[1], 1) == -1)
flexfatal (_("dup2(pipes[1],1)"));
close (pipes[1]);
! if (fdopen (1, "w") == NULL)
flexfatal (_("fdopen(1) failed"));
return true;
- flex 2.5.31 filter.c bug and patch,
Bruce Lilly <=