From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 20 14:03:10 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F5F106564A for ; Sun, 20 Nov 2011 14:03:10 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id D9BBF8FC12 for ; Sun, 20 Nov 2011 14:03:09 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 3EC5F358C59; Sun, 20 Nov 2011 15:03:09 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 272E728468; Sun, 20 Nov 2011 15:03:09 +0100 (CET) Date: Sun, 20 Nov 2011 15:03:09 +0100 From: Jilles Tjoelker To: David Chisnall Message-ID: <20111120140308.GA97965@stack.nl> References: <20110919172214.GJ33993@hoeg.nl> <3A86EAEA-1861-43A6-95DC-FC700BE0E507@theravensnest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: hackers@freebsd.org Subject: Re: xlocale patch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2011 14:03:10 -0000 On Wed, Sep 21, 2011 at 08:28:54PM +0100, David Chisnall wrote: > And here's an updated version of the patch. I've fixed some other > bugs, including where wcstod() and wcstodl() in trunk return the wrong > value for any input string starting with spaces, wchar.h's violation > of POSIX by not declaring FILE, and a few C++ incompatibilities in > other headers (e.g. putchar being a macro, which breaks things like > std::putchar(foo)). All of my libcxxrt and libc++ changes have now > been pushed upstream, so this should now be repeatable. > > The libunwind port still has an irritating bug in the header, where > the extern "C" {} block ends with a semicolon, which causes it to be > rejected in any C++ program, but with that fixed you can compile > libcxxrt (I used cmake .. -DCMAKE_CXX_FLAGS="-I/usr/local/include > -nostdlib -g" - hopefully I'll work out how to make CMake add these > flags automatically soon...). Libc++ should build out of the box with > cmake. I think it is unfortunate that depends on #include order; we should be moving away from such ordering dependencies, not adding more. POSIX does not have such dependencies so if they add all these new _l functions, they will most likely do it differently. POSIX.1-2008 has some of the _l functions but adds them to the plain header; for example isalnum_l() is in like isalnum(), nl_langinfo_l() is in like nl_langinfo() and strcasecmp_l() is in like strcasecmp(). This appears more sensible to me. The header can then be an empty file. -- Jilles Tjoelker