Problen with flex?

Richard Lightman richard at nezumi.plus.com
Mon Apr 28 13:30:18 PDT 2003


* Michael A. Peters <mpeters at mac.com> [2003-04-28 20:46]:
> 
> But at anyrate - when compiling ttmkfdir 3.0.9 on LFS the build would
> fail with the following error:
> 
> parser.cpp: At global scope:
> parser.cpp:1531: declaration of `int isatty(int)' throws different
> exceptions
> /usr/include/unistd.h:686: than previous declaration `int isatty(int)
> throw ()'
> parser.cpp:1310: warning: `void yyunput(int, char*)' defined but not
> used
> make: *** [parser.o] Error 1
> 
> it be a bug in the encoding.l file and not with flex?) and if it is with
> something on my lfs system, what needs to be patched ...
> 
> Any ideas?
> 
The problem is in flex. (If you check encoding.l, you will find
it does not mention isatty). The uncompressed patch was made from
flex-2.5.4a, but stands a fair chance of applying to other versions.
I have not tested it at all. The compressed patch should remove that
irritating warning - and I have tested that.

Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: flex-2.5.4a.patch.bz2
Type: application/octet-stream
Size: 678 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20030428/a97b0d8a/attachment.obj>
-------------- next part --------------
diff -urN flex-2.5.4/flex.skl flex-2.5.4-isatty/flex.skl
--- flex-2.5.4/flex.skl	1996-09-11 00:58:54.000000000 +0100
+++ flex-2.5.4-isatty/flex.skl	2003-04-28 21:22:16.000000000 +0100
@@ -1179,9 +1179,11 @@
 %-
 #ifndef YY_ALWAYS_INTERACTIVE
 #ifndef YY_NEVER_INTERACTIVE
+#ifndef __cplusplus
 extern int isatty YY_PROTO(( int ));
 #endif
 #endif
+#endif
 
 #ifdef YY_USE_PROTOS
 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )


More information about the lfs-dev mailing list