getc in BSD (was FLEX issues)

Mike Meyer mwm-keyword-freebsdhackers2.e313df at
Tue Jul 4 00:06:54 UTC 2006

In <44A9AC43.3090606 at>, James Bailie <jimmy at> typed:
> Randall Hyde wrote:
>  > This kind of gives me the impression that "getc" is defined a bit
>  > differently under FreeBSD than other environments?  Any ideas?
> Yes.  It's defined as a macro.

Linux says that getc "may be implemented as a macro". Anything that
needs a function should be using fgetc, not getc. But

Mike Meyer <mwm at>
Independent Network/Unix/Perforce consultant, email for more information.

More information about the freebsd-hackers mailing list