From owner-freebsd-questions@freebsd.org Wed Feb 24 01:55:37 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 6AFD3AB19DC for ; Wed, 24 Feb 2016 01:55:37 +0000 (UTC) (envelope-from 0000015310f49c11-b68f39f2-f777-4e59-a74d-aa87894f7430-000000@us-west-2.amazonses.com) Received: from a27-116.smtp-out.us-west-2.amazonses.com (a27-116.smtp-out.us-west-2.amazonses.com [54.240.27.116]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 466F714EF for ; Wed, 24 Feb 2016 01:55:37 +0000 (UTC) (envelope-from 0000015310f49c11-b68f39f2-f777-4e59-a74d-aa87894f7430-000000@us-west-2.amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=4nphvxivhgsntfxkzsopqsdbvjscuhxm; d=vmeta.jp; t=1456278379; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID; bh=XB0EADyEnzs+cXFySEMWr/Iv4LrSVq8FVlMa1/epIBs=; b=vuahpQo0A+GFtbCxuZz+jBrhTlr5aSRYr64o5H2nUlEqRFCWoGWomyKUJbHu1k5k 01gAg3t/+/jRd7JV1+IFV0Mq//4jdoO0XegMi6qa/wh/RAh9wodPX2WWobHo5q+c46r IFHChR1WLnVw4r1ITG5qubOxSO5SMdejF4zwulS4= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=7v7vs6w47njt4pimodk5mmttbegzsi6n; d=amazonses.com; t=1456278379; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID:Feedback-ID; bh=XB0EADyEnzs+cXFySEMWr/Iv4LrSVq8FVlMa1/epIBs=; b=czbIiWNI77TUmAdv6NHct2GVKLHqlPXSzrJiIAL0WWiluhfNci3PdYPTITPzQfxT h203r/SojJPa87L/36svZCN+P7j3Tq3FfVr7MP4WXJGfsFX4O8DUq05FUwEhnutzbg9 B5FOnryUSXqS0jndzB6GIUPHBz0HDdjSQJN9JkDQ= X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on glory.vmeta.jp X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 24 Feb 2016 01:46:19 +0000 From: Koichiro IWAO To: andrew clarke Cc: freebsd-questions@freebsd.org Subject: Re: how to know if bug 198092 applied in C program? In-Reply-To: <20160223125057.GA41865@ozzmosis.com> References: <000001530cf44e47-ccacfe21-94cc-4fb0-898b-c726a3c608e1-000000@us-west-2.amazonses.com> <20160223125057.GA41865@ozzmosis.com> Message-ID: <0000015310f49c11-b68f39f2-f777-4e59-a74d-aa87894f7430-000000@us-west-2.amazonses.com> X-Sender: meta@vmeta.jp User-Agent: Roundcube Webmail/1.1.4 X-SES-Outgoing: 2016.02.24-54.240.27.116 Feedback-ID: 1.us-west-2.ngRt4x2U/cWqug8pbfjwMxB6pcDw1fmN73bGmMLYyRI=:AmazonSES 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 01:55:37 -0000 Thanks. I'll try configure script. 2016-02-23 21:50 に andrew clarke さんは書きました: > 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 -- `whois vmeta.jp | nkf -w` meta