help-flex
[Top][All Lists]
Advanced

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

Re: Flex: Cygwin and Windows ports


From: Vincent Caron
Subject: Re: Flex: Cygwin and Windows ports
Date: Tue, 22 Oct 2002 18:08:08 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910

Bruce Lilly wrote:
Vincent Caron wrote:

All right, so here _WIN32 should be replaced by _MSC_VER which is specific to the Visual compiler series.

NO!!!  You have completely missed the point. The compiler is a
separate issue from the compilation environment, the libraries,
and the run-time environment.  The MS compiler will always
define _WIN32 and _MSC_VER even when used in an environment
which has unistd.h, htons, int64_t, etc.

I see. But the compiler and the environment are closely tied. It seems I am a rare and crazy beast trying to use Flex with Cygwin and MS tools (at least for the post-2.5.4 series). I find it pretty insane - or at least rather academic - trying to build Flex with Cygwin and a non-cygwin env, or with MSVC and a non-MSVC env.

Anyway, would you suggest to use a new macro to denote the MS default environment ? Like PLAIN_BORING_MS_WORLD to replace _WIN32 ? :)


Use the mechanism provided by configure, e.g. for unistd,h
use the HAVE_UNISTD_H macro.

Okay, so the patch in scan.l should read :

#ifndef HAVE_UNISTD_H
#define YY_NO_UNISTD_H
#endif

In order I can compile flex-2.5.23 with a scan.c generated by flex-2.5.22.





reply via email to

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