
rurban at x-ray
Nov 25, 2009, 2:16 PM
Post #3 of 3
(190 views)
Permalink
|
|
Re: lexer API change broke MinGW/VC6/VC7 builds
[In reply to]
|
|
2009/11/25 Reini Urban <rurban [at] x-ray>: > 2009/11/17 Jan Dubois <jand [at] activestate>: >> On Mon, 16 Nov 2009, Steve Hay wrote: >>> >>> The build failure in every configuration here is caused by >>> f0e67a1d29102aa9905aecf2b0f98449697d5af3 (lexer API). That was a smoke >>> using MinGW/gcc 3.4.5. >>> >>> Not sure what gcc's problem is. It crashes miniperl.exe when running >>> make_patchnum.pl. VC++ 8 and 9 are fine, but VC++ 6 and 7 crash just >>> like gcc. >> >> I think the problem is ftell() in msvcrt (which both MinGW and VC6 are >> using). ftell() doesn't seem to check explicitly for a NULL FILE* argument >> and just crashes instead. I assume Microsoft fixed this in MSVCR80 and >> later to return an error instead. >> >> I've "fixed" this problem in commit 490354310ad, but I wonder if the control >> flow is otherwise correct; it doesn't look equivalent to what the old code >> did. Maybe "somebody else" could have a second look to double-check that >> things are as they should? > > This commit broke cygwin. > I get spurious tokenizer errors with tabs in .pl files. > With this patch revoked it works fine. Uuh, sorry. I've spoken too soon. bisect script error. It still fails with ./miniperl.exe -Ilib autodoc.pl Unrecognized escape \s passed through at autodoc.pl line 157. Unrecognized escape \s passed through at autodoc.pl line 157. Unrecognized escape \s passed through at autodoc.pl line 157. Unrecognized escape \s passed through at autodoc.pl line 157. Unrecognized escape \s passed through at autodoc.pl line 157. at every source with tabs. Investigating further. 5.11.2 is broken, 5.11.1 was fine. > > commit edb47d5e45750eb7ab61981e15a22f43672ff4f4 > Author: Jan Dubois <jand [at] activestate> > Date: Mon Nov 16 15:01:26 2009 -0800 > > Remove dead preprocessor code from toke.c > > The symbol FTELL_FOR_PIPE_IS_BROKEN is no longer being used > and should have been removed with the commit 4c84d7f2, which > removed the -P option. > > diff --git a/toke.c b/toke.c > index 6b5ef4f..a17dc4c 100644 > --- a/toke.c > +++ b/toke.c > @@ -4337,19 +4337,6 @@ Perl_yylex(pTHX) > *(U8*)s == 0xEF || > *(U8*)s >= 0xFE || > s[1] == 0)) { > -#ifdef PERLIO_IS_STDIO > -# ifdef __GNU_LIBRARY__ > -# if __GNU_LIBRARY__ == 1 /* Linux glibc5 */ > -# define FTELL_FOR_PIPE_IS_BROKEN > -# endif > -# else > -# ifdef __GLIBC__ > -# if __GLIBC__ == 1 /* maybe some glibc5 release had it like this? */ > -# define FTELL_FOR_PIPE_IS_BROKEN > -# endif > -# endif > -# endif > -#endif > bof = PerlIO_tell(PL_rsfp) == (Off_t)SvCUR(PL_linestr); > if (bof) { > PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); > > > -- > Reini Urban > http://phpwiki.org/ http://murbreak.at/ > -- Reini Urban http://phpwiki.org/ http://murbreak.at/
|