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

Re: __FreeBSD__ define



On Wed, Mar 29, 2006 at 04:10:40AM +0200, Peter Palfrader wrote:
> Hey,
> 
> one of my packages checks whether __FreeBSD__ is defined[1] and if that
> is the case i then avoids including machine/limits.h as this only causes
> noise on FreeBSD[0].
> 
> It seems the Debian/KFreeBSD port doesn't have __FreeBSD__ define.
> 
> Is __FreeBSD__ only for the Real FreeBSD, and if yes, what should the
> code check for instead or in addition?

Hi!

Brian already answered about macros, but anyway, I was wondering:  why not
something like this instead?:

#if HAVE_SYS_LIMITS_H
#include <sys/limits.h>
#elif HAVE_MACHINE_LIMITS_H
#include <machine/limits.h>
#endif

-- 
Robert Millan



Reply to: