[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems.
From: |
Peter Rosin |
Subject: |
[PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems. |
Date: |
Wed, 21 Dec 2011 10:58:03 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Hi!
Below is a patch that makes the lex library detection and
the yytext-pointer tests not stumble when the system does
not provide a unistd.h include.
Ok to push?
Cheers,
Peter
--------------------8<---------------------
* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
Don't require unistd.h to be present, which it isn't
with, e.g., MSVC.
---
ChangeLog | 7 +++++++
lib/autoconf/programs.m4 | 4 ++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0f67f89..732e388 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-21 Peter Rosin <address@hidden>
+
+ Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems.
+ * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
+ Don't require unistd.h to be present, which it isn't
+ with, e.g., MSVC.
+
2011-12-07 Paul Eggert <address@hidden>
AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index fb3d8b9..0e97070 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -719,6 +719,10 @@ fi])
# declares yytext as a char * by default.
m4_define([_AC_PROG_LEX_YYTEXT_DECL],
[cat >conftest.l <<_ACEOF[
+%{
+/* avoid non-ANSI #include of unistd.h */
+#define YY_NO_UNISTD_H 1
+%}
%%
a { ECHO; }
b { REJECT; }
--
1.7.5.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fix LEXLIB and YYTEXT_POINTER on non-ANSI systems.,
Peter Rosin <=