[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems.
From: |
Peter Rosin |
Subject: |
Re: [PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems. |
Date: |
Mon, 05 Mar 2012 10:48:28 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
Paul Eggert skrev 2012-01-04 19:01:
> On 01/04/12 01:06, Peter Rosin wrote:
>> Or did you mean that configure should only #define YY_NO_UNISTD_H
>> when there is no unistd.h (ac_cv_header_unistd_h=no)?
>
> Yes, that's the idea, it should define YY_NO_UNISTD_H as
> needed. Something like the following. Does this work for you?
Hi!
Sorry for the huge delay, I simply forgot to hit send and then my message
languished in the drafts folder...
Yes that works as well, please push. Thanks!
Cheers,
Peter
> autoconf: don't assume unistd.h when checking lex
> * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
> Define YY_NO_UNISTD_H if there's no unistd.h; this
> works around a flex bug. Problem reported by Peter Rosin in:
> http://lists.gnu.org/archive/html/autoconf-patches/2011-12/msg00011.html
> diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
> index 2013a7a..24ccc19 100644
> --- a/lib/autoconf/programs.m4
> +++ b/lib/autoconf/programs.m4
> @@ -718,7 +718,13 @@ fi])
> # Check for the Lex output root, the Lex library, and whether Lex
> # declares yytext as a char * by default.
> m4_define([_AC_PROG_LEX_YYTEXT_DECL],
> -[cat >conftest.l <<_ACEOF[
> +[AC_CHECK_HEADERS_ONCE([unistd.h])
> +cat >conftest.l <<_ACEOF[
> +%{
> +#ifndef HAVE_UNISTD_H
> +# define YY_NO_UNISTD_H 1
> +#endif
> +%}
> %%
> a { ECHO; }
> b { REJECT; }
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems.,
Peter Rosin <=