NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/43063: Please delete __NetBSD_Prereq__() from <sys/param.h>
The following reply was made to PR kern/43063; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/43063: Please delete __NetBSD_Prereq__() from <sys/param.h>
Date: Sun, 13 Jul 2014 16:55:00 +0000
On Sun, Jul 13, 2014 at 02:20:01PM +0000, Joerg Sonnenberger wrote:
> > /* This was fixed in NetBSD */
> > #ifdef __NetBSD_Prereq__
> > # if __NetBSD_Prereq__(6, 99, 20)
> > # undef IPV6_POLLADDRFLAG
> > # endif
> > #endif
> >
> > Should this be now be moved to a ./configure test based on uname -m?
> > ./configure is NOT run when dhcpcd is imported into external so that may
> > complicate future pullups if changed.
>
> Just use __NetBSD_Version directly?
Anyway, yeah, the problem with __NetBSD_Prereq__ is that you can't
tell by looking at the name of it whether it means "before 6.99.20" or
"after 6.99.20", and NetBSD versions (including releases) have been
shipped both ways.
So it's much better to write
#if __NetBSD_Version__ >= 699002000
although as I noted some years ago, it might be better to avoid
exposing the bit encoding of the number, something like
#if __NetBSD_Version__ >= __NetBSD_mkversion__(6, 99, 20)
The problem with that is that writing a macro that handles all the
variants (including post-release stable branches and so on) isn't
entirely trivial.
The last time I made an attempt to get this settled there wasn't a
whole lot of opposition to fixing it, but there wasn't a clear
consensus on how either and so it didn't get done.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index