help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flex output compatibility with MS Visual C++


From: Michael Kirkham
Subject: Flex output compatibility with MS Visual C++
Date: Mon, 26 Nov 2001 03:36:41 -0800 (PST)

To whomever it may concern: just a quick note about the output generated
by flex.  The skeleton file flex.skl includes the file <unistd.h>, which
does not exist in MS VC++.  A quick change to instead include <io.h> on
this platform seems to be sufficient to compile flex lexers under MS VC++.
(My environment happens to include flex 2.5.4 and VC++ 5.0.)

*** flex.skl.old        Mon Nov 26 03:29:56 2001
--- flex.skl    Mon Nov 26 03:22:37 2001
***************
*** 27,33 ****
--- 27,37 ----
  %+
  class istream;
  %*
+ #ifdef _MSC_VER /* For Microsoft Visual C++ */
+ #include <io.h>
+ #else /* _MSC_VER */
  #include <unistd.h>
+ #endif        /* _MSC_VER */

  /* Use prototypes in function declarations. */
  #define YY_USE_PROTOS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]