Craig Rodrigues wrote:
> In <sys/syslimits.h>, I see:
> 
> #if __GNUC__
> #warning "No user-serviceable parts inside."
> #endif
> 
> Does the use of #warning need to be protected by
> #if __GNUC__ in FreeBSD header files?

Yes.  It is a preprocessor directive specific the GCC preprocessor.
This was discussed in great detail about a month ago, when the
people trying to get TenDRA to compile FreeBSD discovered to their
horror that TenDRA's preprocessor incorrectly assigns meaning to
code that's #if'ed out, and blew chunks on the #warning, when it
should have ignored it.

> Some other header files check for __GNUC__ before using #warning,
> such as <sys/ioctl.h>, but <sys/dkstat.h> does not.

<sys/dkstat.h> is wrong.  Please see the original discussion for
more details.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to