From owner-freebsd-toolchain@FreeBSD.ORG Fri Nov 23 21:27:57 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49399442 for ; Fri, 23 Nov 2012 21:27:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id F2E9B8FC13 for ; Fri, 23 Nov 2012 21:27:56 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d00c:cf93:2eda:7a7] (unknown [IPv6:2001:7b8:3a7:0:d00c:cf93:2eda:7a7]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2DC315C37; Fri, 23 Nov 2012 22:27:50 +0100 (CET) Message-ID: <50AFEA5D.2020607@FreeBSD.org> Date: Fri, 23 Nov 2012 22:27:57 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Yamaya Takashi Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi References: <50AEB0A1.3090803@kbh.biglobe.ne.jp> In-Reply-To: <50AEB0A1.3090803@kbh.biglobe.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2012 21:27:57 -0000 On 2012-11-23 00:09, Yamaya Takashi wrote: > With -std=c++98, -std=c++03 or -ansi, __LONG_LONG_SUPPORTED is not defined. > So some functions((lldiv_t, )atoll, strtoll, strtoull, llabs, lldiv, > wcstoll, wcstoull) are undeclared. > But libc++ headers(cstdlib and cwchar) use them. The general idea of your patch is good, but we need to check it with upstream first. For example, __LONG_LONG_SUPPORTED is a FreeBSD specific define, so for the general case the solution might be more complicated. Note there are also other problems when compiling libc++ with -std=c++98 and -std=c++03, such as complaints about namespacing and such. I am not entirely sure libc++ is fully supported yet under those restrictions. :) In any case, I will see if I can come up with a patch which is more suitable for upstream, and move the discussion there.