Date: Fri, 23 Nov 2012 22:27:57 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp> Cc: toolchain@freebsd.org Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi Message-ID: <50AFEA5D.2020607@FreeBSD.org> In-Reply-To: <50AEB0A1.3090803@kbh.biglobe.ne.jp> References: <50AEB0A1.3090803@kbh.biglobe.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50AFEA5D.2020607>