From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7080 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: wchar_t and -fshort-wchar Date: Fri, 20 Feb 2015 02:27:01 -0500 Message-ID: <20150220072700.GR23507@brightrain.aerifal.cx> References: <20150218105337.GA8567@zx-spectrum> <20150220042602.GQ23507@brightrain.aerifal.cx> <20150220065302.GA1364@zx-spectrum> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1424417245 11195 80.91.229.3 (20 Feb 2015 07:27:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2015 07:27:25 +0000 (UTC) Cc: "musl@lists.openwall.com" To: Sergey Dmitrouk Original-X-From: musl-return-7093-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 20 08:27:25 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YOhzc-0003wT-Bj for gllmg-musl@m.gmane.org; Fri, 20 Feb 2015 08:27:20 +0100 Original-Received: (qmail 3829 invoked by uid 550); 20 Feb 2015 07:27:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3751 invoked from network); 20 Feb 2015 07:27:14 -0000 Content-Disposition: inline In-Reply-To: <20150220065302.GA1364@zx-spectrum> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7080 Archived-At: On Fri, Feb 20, 2015 at 08:53:02AM +0200, Sergey Dmitrouk wrote: > On Thu, Feb 19, 2015 at 08:26:02PM -0800, Rich Felker wrote: > > musl does not support configurations with under-sized definitions of > > types like 16-bit wchar_t or 32-bit off_t. Only the sizes that can > > represent the full range of values are supported. musl does however > > have the C11 uchar.h functions which can operate on char16_t, so you > > could use char16_t and the corresponding c16 conversion functions > > instead of the wc versions if that helps. What are you trying to > > achieve? > > Nothing particular, -fshort-wchar is dictated by some compatibility > requirements, which are probably caused by building things on Windows, > where sizeof(wchar_t) usually equals to 2. Maybe the flag will go away > later, if not, will try using uchar.h in case there will be a need, thanks > for the pointer. musl won't work with -fshort-wchar, so the flag needs to go away. If you compile musl with that you'll just get a broken (and potentially even dangerous; it's hard to say) libc build. If you compile the application (but not libc) with that option, you'll get mismatching ABI and things will break if you call any functions that operate on wchar_t arrays, but if you're not actually using these functions you might not even see any breakage. If there's no specific reason this option is being used I think it just needs to be removed from the build and everything should work fine. Rich