Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2003 14:41:23 +0100
From:      Max Laier <max@love2party.net>
To:        Mark Huizer <freebsd+current@dohd.org>, current@freebsd.org
Subject:   Re: kern.osreldate and EAI_NODATA deprecation
Message-ID:  <200312311441.23719.max@love2party.net>
In-Reply-To: <20031231132651.GC59239@eeyore.local.dohd.org>
References:  <20031231130800.GB59239@eeyore.local.dohd.org> <200312311421.25383.max@love2party.net> <20031231132651.GC59239@eeyore.local.dohd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 31 December 2003 14:26, Mark Huizer wrote:
> > __FreeBSD_version is defined in sys/sys/param.h. The closest for your
> > case is: 501112 from October 16th.
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/param.h
> >
> > I'd rather suggest using an unconditional patch which introduces #ifdef
> > EAI_NODATA where required. That is future save (as the comment notes that
> > EAI_NODATA will go forever on Apr 23th).
>
> Well, that's tougher, since EAI_NODATA is defined (it's defined to be
> EAI_NODATA).
> Hmm...
> would this work? I'm not too 100% secure about preprocessing stuff.
> If this should work, I could try to get it included in the normal kaffe
> tree.
>
> #if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME
> ...
> #endif

Other question, does it hurt you that EAI_NODATA == EAI_NONAME? I'd not think 
so ... so why borther?! But yes, the syntax is okay ... consider extra 
parentheses for the second expression.

> Perhaps I should put a defined(__FREEBSD__) somewhere in there as well.
>
> #if !defined(__FREEBSD__) || (defined(EAI_NODATA) && EAI_NODATA !=
> EAI_NONAME)
>
> Something like that?

As long as you keep it locally in the *FreeBSD* ports tree there is no point 
in checking that twice. If you plan to submit patches to the original authors 
you might want to double check which platforms have EAI_NODATA and which 
don't (as the commit messages hints that there might be others w/o 
EAI_NODATA). autoconf and friends ...

-- 
Best regards,				| max@love2party.net
Max Laier				| ICQ #67774661
http://pf4freebsd.love2party.net/	| mlaier@EFnet #DragonFlyBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312311441.23719.max>