Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jul 2006 13:28:46 -0700 (GMT-07:00)
From:      Randall Hyde <randyhyde@earthlink.net>
To:        freebsd-hackers@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: getc in BSD (was FLEX issues)
Message-ID:  <4596402.1152131326848.JavaMail.root@elwamui-milano.atl.sa.earthlink.net>

next in thread | raw e-mail | index | archive | help


-----Original Message-----
>From: Steve Kargl <sgk@troutmask.apl.washington.edu>
>Sent: Jul 4, 2006 11:40 AM
>To: Randall Hyde <randyhyde@earthlink.net>
>Cc: freebsd-hackers@freebsd.org
>Subject: Re: getc in BSD (was FLEX issues)
>
>On Mon, Jul 03, 2006 at 11:34:41AM -0700, Randall Hyde wrote:
>> 
>> The error reported is "syntax error before numeric constant".
>> This kind of gives me the impression that "getc" is defined a bit
>> differently under FreeBSD than other environments?  Any ideas?
>
>As others have stated, getc() is implemented via a macro,
>which may depend on other macros.  In reading the flex 
>NEWS file, I ran across the -Cr option.  I added this 
>option to your flex command, and the hla.flx file is 
>processed and produces a compilable lex.yy.c.
>
>-- 
>Steve

Yeah, getc was the problem. I modified flex (via one the various macros it defines) to emit fgetc rather than getc and the problem went away.  I'll have to try the -Cr option and see what happens there.
Cheers,
Randy Hyde





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4596402.1152131326848.JavaMail.root>