Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 2016 02:44:58 +0000
From:      Koichiro IWAO <meta@vmeta.jp>
To:        freebsd-questions@freebsd.org
Subject:   Re: how to know if bug 198092 applied in C program?
Message-ID:  <00000153112a4dc5-3ff13110-00a4-4a5e-85ce-a3a81d97eb95-000000@us-west-2.amazonses.com>
In-Reply-To: <b30b655bcf0f1259f31bb1a1c3f6a40c@vmeta.jp>
References:  <b30b655bcf0f1259f31bb1a1c3f6a40c@vmeta.jp>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
I looked at source code[1] again and finally find out

#if AI_MASK & AI_V4MAPPED

or

#if AI_MASK & AI_V4MAPPED > 0

would be simple and effective.

[1] 
https://svnweb.freebsd.org/base/stable/10/include/netdb.h?r1=292722&r2=292721&pathrev=292722

2016-02-23 16:07 に Koichiro IWAO さんは書きました:
> Hello,
> 
> I'm writing a C program and having a question.
> 
> My program is intended to run under stable/9, releng/9.3, stable/10,
> releng/10.2, releng/10.3 and sometimes current.  Stables are not always
> up to date.
> 
> I'd like to check if getaddrinfo(3) supports AI_V4MAPPED using 
> something
> like "#ifdef" or "#if" macros because it is not necessarily 
> implemented[1].
> Probably I can use __FreeBSD_version for that.  Is this way good? If 
> so,
> 
>> #if __FreeBSD_version > __VALUE__
> 
> what the __VALUE__ will be?
> 
> 
> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198092
> 
> Thanks,

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?00000153112a4dc5-3ff13110-00a4-4a5e-85ce-a3a81d97eb95-000000>