Subject: Re: Detecting statvfs without autoconf
To: None <joerg@britannica.bec.de>
From: David Brownlee <abs@NetBSD.org>
List: tech-userlevel
Date: 01/05/2006 16:52:46
On Thu, 5 Jan 2006, joerg@britannica.bec.de wrote:

> On Thu, Jan 05, 2006 at 06:32:53AM -0500, Thomas Dickey wrote:
>> On Thu, Jan 05, 2006 at 12:26:07PM +0100, Christoph Kaegi wrote:
>>> Thanks! I went for:
>>>
>>>   #if defined(SOLARIS) || __NetBSD_Version__  >= 300000000
>>
>> and if __NetBSD_Version__ isn't defined, it won't work with some compilers.
>
> It works, since undefined macros have a value of 0. Many compilers
> generate warnings though.

 	The canonical test (as implemented in many pkgsrc patches)
 	would be:

#if defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900) /* NetBSD 2.99.9 */

-- 
 		David/absolute       -- www.NetBSD.org: No hype required --