mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Sergey Dmitrouk <sdmitrouk@accesssoftek.com>
Cc: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: wchar_t and -fshort-wchar
Date: Fri, 20 Feb 2015 02:27:01 -0500	[thread overview]
Message-ID: <20150220072700.GR23507@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150220065302.GA1364@zx-spectrum>

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


      reply	other threads:[~2015-02-20  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 10:53 Sergey Dmitrouk
2015-02-18 11:54 ` Szabolcs Nagy
2015-02-18 14:04   ` Sergey Dmitrouk
2015-02-20  4:26 ` Rich Felker
2015-02-20  6:53   ` Sergey Dmitrouk
2015-02-20  7:27     ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150220072700.GR23507@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=sdmitrouk@accesssoftek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).