From owner-freebsd-questions@freebsd.org Wed Feb 24 00:55:44 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E876DAB221B for ; Wed, 24 Feb 2016 00:55:44 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by mx1.freebsd.org (Postfix) with ESMTP id D05C41439 for ; Wed, 24 Feb 2016 00:55:44 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a80.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) by hapkido.dreamhost.com (Postfix) with ESMTP id 2CD7890CC7 for ; Tue, 23 Feb 2016 04:51:07 -0800 (PST) Received: from homiemail-a80.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTP id 1B3D437A076; Tue, 23 Feb 2016 04:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ozzmosis.com; h=date:from :to:cc:subject:message-id:references:mime-version:content-type: in-reply-to; s=ozzmosis.com; bh=f/Sl8Z7RXB8w34zGwBq/omLKjH0=; b= W3+uPpNc/+0PlXBh12TjDUWC9o1e8aLHWIhPr6/D5AVGS7ctnnoz9mHgX7Se+w/h 9fjGokQXCgJsaYMPVpNPg634FACXbwHfwiI/48KRLTn3QGkO4TrJcBU1qwld8lq7 lJGJCKiasH0lPC/a/BnMnD8MCJtZXfCTiQ8FNrhqtcg= Received: from blizzard.ozzmosis.com (unknown [202.161.22.216]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: relay@ozzmosis.com) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTPSA id C8FAD37A075; Tue, 23 Feb 2016 04:51:00 -0800 (PST) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id C3B65ABA; Tue, 23 Feb 2016 23:50:57 +1100 (AEDT) Date: Tue, 23 Feb 2016 23:50:57 +1100 From: andrew clarke To: Koichiro IWAO Cc: freebsd-questions@freebsd.org Subject: Re: how to know if bug 198092 applied in C program? Message-ID: <20160223125057.GA41865@ozzmosis.com> References: <000001530cf44e47-ccacfe21-94cc-4fb0-898b-c726a3c608e1-000000@us-west-2.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001530cf44e47-ccacfe21-94cc-4fb0-898b-c726a3c608e1-000000@us-west-2.amazonses.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2016 00:55:45 -0000 On Tue 2016-02-23 07:07:30 UTC+0000, Koichiro IWAO (meta@vmeta.jp) wrote: > 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? I think you could use a configure script (not necessarily Autoconf) instead, and test for AI_V4MAPPED support at build time. https://en.wikipedia.org/wiki/Configure_script