From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7604 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.linux.lib.musl.general Subject: RE: There is no tests for musl, Date: Fri, 08 May 2015 13:01:45 -0700 Message-ID: <20150508130145.dc30d64f61e5ec441c34ffd4f788e58e.31f81ebf87.wbe@email15.secureserver.net> 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 1431115327 13247 80.91.229.3 (8 May 2015 20:02:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 May 2015 20:02:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7617-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 08 22:02:03 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 1YqoTA-0005Pw-Fk for gllmg-musl@m.gmane.org; Fri, 08 May 2015 22:02:00 +0200 Original-Received: (qmail 1850 invoked by uid 550); 8 May 2015 20:01:59 -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 1829 invoked from network); 8 May 2015 20:01:58 -0000 X-SID: RY1m1q0012Zk7fR01 X-Originating-IP: 128.143.141.35 User-Agent: Workspace Webmail 5.14.0 Xref: news.gmane.org gmane.linux.lib.musl.general:7604 Archived-At: On 05/08/2015 11:41 AM, =E7=BD=97=E5=8B=87=E5=88=9A(Yonggang Luo) wrote:>>= >> solution, I=0Athink there is no one would use=0A>>>> wchar_t for cross t= ext processing, cause, on some system, wchar_t is=0A>>>> just 8bit width!= =0A>>>=0A>>> anybody would use wchar_t who cares about standard conformant= =0A>>> implementations.=0A>>>=0A>>> non-standard broken platforms may get a= n unmaintained #ifdef=0A>>> as usual..=0A>>=0A>> I think we (and midipix) h= ave a different perspective from Yonggang=0A>> Luo on portable development.= Our view is that you write to a POSIX (or=0A>> nearly-POSIX) target with f= ully working Unicode support and fix the=0A>> small number of targets (i.e.= just Windows) that don't already provide=0A> Small is relative, if countin= g the distribution count, well, Unix wins.=0A>> these things. Yonggang Luo'= s perspective seems to be more of a=0A>> traditional Windows approach with = #ifdef and lots of OS-specific code,=0A>> but just making the Windows branc= h of the #ifdefs less hideous than it=0A>> was before. :)=0A> If getting wc= har_t to be 32 bit on win32, then truly will be a lot of=0A> #ifdef, I am n= ot so sure=0A> if you have experience on Win32 API development, I hope we d= iscussing=0A> the problems in a=0A> more objective way.=0A> =0A=0AOne pri= mary objective of code portability and posix-compatibility layer=0Afor win3= 2 is to _remove_ the need for OS-specific code-paths. A wchar_t=0Athat is a= nything short (no pun intended) of a 32-bit integer will render=0Ait imposs= ible to build out of the box many pieces of commonly-used=0Asoftware, inclu= ding, but not limited to musl libc, the curses library,=0Aand anything that= expects wchar_t to cover the entire unicode range.=0A=0AAs for your sugges= ted framework: there are currently at least three=0Acompilers that can prod= uce optimized code for the target platform (gcc,=0Aclang, and cparser), and= which work very well with most open-source=0Asoftware out there. As an asi= de, if you are interested in an 8-byte long=0Aon 64-bit windows then an ope= n-source compiler is probably your only=0Aoption. To compile musl with msvc= , on the other hand, you'd have to make=0Aso many changes to the source cod= e that you might as well write your own=0Alibc from scratch. To see why, pl= ease attempt to compile some ten or=0Afifteen core libc headers (stdio.h, u= nistd.h, etc.) with msvc. If that=0Agoes well (spoiler: it won't), then the= next step would be to compile a=0Asubset of the source files (src/pthread = or src/stdio, for instance) and=0Aremove any remaining obstacles.=0A=0Am.= =0A=0A=0A>>=0A>> Rich=0A> =0A> =0A> =0A=0A