From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7619 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?572X5YuH5YiaKFlvbmdnYW5nIEx1bykg?= Newsgroups: gmane.linux.lib.musl.general,gmane.comp.standards.posix.austin.general,gmane.comp.compilers.clang.devel Subject: Re: Re: [cfe-dev] Is that getting wchar_t to be 32bit on win32 a good idea for compatible with Unix world by implement posix layer on win32 API? Date: Sun, 10 May 2015 20:31:54 +0800 Message-ID: References: <20150509103645.GG29035@port70.net> <20150509200535.GK17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1431261150 31384 80.91.229.3 (10 May 2015 12:32:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 May 2015 12:32:30 +0000 (UTC) Cc: John Sully , Karsten Blees , musl@lists.openwall.com, dplakosh@cert.org, austin-group-l@opengroup.org, hsutter@microsoft.com, Clang Dev , James McNellis To: Rich Felker Original-X-From: musl-return-7632-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 10 14:32:29 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 1YrQPE-0002OD-Hl for gllmg-musl@m.gmane.org; Sun, 10 May 2015 14:32:28 +0200 Original-Received: (qmail 23834 invoked by uid 550); 10 May 2015 12:32:27 -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 23813 invoked from network); 10 May 2015 12:32:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=5uyZlypeVHNxqUI4bFG+1B1BeDbVDFhuwq4u3Rf6FrU=; b=WyyQuRcfcTpIGXY1ZvBphYOdcATA1O4dKnDrBz4F0Ci+eC7DkMT5IiTY++zCIVSm73 AQz+0jokaEnm32AuSZY2q2CoCOCftTpK2TMXZJxsbY8MUlsbkMa7wwRKzK5q0oK2NJHY DTVXNrCkG4kwoS8SWrJr0ff3jay/memzPqvL3Q0rPhNcraAcH59u+dG2QqHGYF/FTMl8 QQJqnAHlQLk9WzU/xAnCYNW2VbrW7SB3y6JAcs+swPoqIBPdw+Udm1QTrQL8kAt8yBxr tsxg/NWIkqmpj3VALWDFrap69nXILN6ChSKHXXos6gTSO24Rcw0hO7MZ7fH8TNG9YWWl 6kIw== X-Received: by 10.50.64.244 with SMTP id r20mr9037450igs.48.1431261135249; Sun, 10 May 2015 05:32:15 -0700 (PDT) In-Reply-To: <20150509200535.GK17573@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:7619 gmane.comp.standards.posix.austin.general:10764 gmane.comp.compilers.clang.devel:42679 Archived-At: For example, the open function exist both in msvcrt and posix, int open(const char *path, int oflag, ...); But in msvcrt, the path is ANSI encoding, and in posix, path is utf8 encodi= ng, So if we need to developing a cross-platform application, On Win32, the open function should not be used. But in fact, there is no openw(const wchar*path) API in posix or Win32, So we need to re-implement open function on win32 with the same API, and convert to the wchar_t version of Window 32 API, _wopen, That's would be a chaos for those developers want to use open function in both posix and win32. And if we turn the wchar_t to be 32 bit on win32, first, posix still have no wide version of open function second, to implement open function on win32, we need to consider the fact wchar_t is 32bit now, and should re-use the exist _wopen in a different way and all other exist wide version of Win32 API. --=20 =E6=AD=A4=E8=87=B4 =E7=A4=BC =E7=BD=97=E5=8B=87=E5=88=9A Yours sincerely, Yonggang Luo