Flex compilation with TC
Greg McGary
gm at romeo.cs.duke.edu
Fri Jun 2 12:34:30 AEST 1989
In article <394 at tuewsd.UUCP> wsinpp at tuewsd.UUCP (Peter Peters) writes:
>I tried to compile Flex (the lex replacement) on an IBM-PC
>using Turbo-C 1.0. The compilation works just fine (a few
>warnings) but the resultant executable seems to be corrupt.
>Execution of flex produces an empty lex-yy.tab (lex.yy.tab)
>file and simply stops the machine. Using ^C gives the message
>that something is wrong with memory allocation and that
>command.com cannot be loaded, so the machine is dead.
>Anyone out there who can enlighten me ?
>If this is not the correct newsgroup for this kind of message
>I'm sorry..
If you compile flex with `-N' enabling stack-overflow detection, you
will discover that the stack is overflowing. No matter how big you
make _stklen, this will persist. The problem is that the time(3) library
function called from gettime() itself calls an internal function called
gettime(), so you get stuck in an infinite double-recursion. The workaround
is to rename flex's gettime() to get_time() or some such.
Also, be sure to compile with the large-model...
-- Greg McGary
-- 10310 Main Street #354, Fairfax, Virginia 22030 voice: (703) 266-7249
-- {decvax,hplabs,seismo,mcnc}!duke!gm data: (703) 266-7258
-- gm at cs.duke.edu
More information about the Comp.lang.c
mailing list