delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/01/09/19:08:03

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=V5NF1d0
YpP4aW2BaYXG9tn2CNBMb7QivClD1kJUf0L1glcyLTOnDToGXfIO/u5JbxdvDPwY
z9lMWB8/Jrav1rFIrSmPn91exUki1ArgMpfFIbrzKf50ttBdKvWT0aTDjtk5O+xz
t4Nbke8U0lfABMY3uO64v5uYPzy7+aCsKYdI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=U+oHBK7wzF+jr
NYpE48Mmu6Qju4=; b=adgYrr/gn6Xjwfz+ZaKO6v9JSzEB7r+Am3Khysv0sR14/
AbIfM2pS1MLBsIXBZ8/5l2Ok37JZ5brfskzaauRz3bhFdGtfH/oozfbIAeWDd2/Q
ErhLK4Vyq2IClMlVjNs/fTaYwgVSu6TLnkuI7ilyA3mWrcoLBl3RRXalv0QdT0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=limitation, jony, JonY, cygwins
X-HELO: mail-it1-f196.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=jYLasmtyymDdTgptVpyQ7bD9aBkg4okQSM2RCxevZVs=; b=nnAwnZolHylftrrfnJ6H7mrgORL3hGfmUKfHgHZdE2Bhew/E173fkLXL2EL6C/TLsf 4Cd42ww5XslCztZW47UKkLC6z649f6d3Nhw1Myb0ANaB694NJSpQFvVSYBs1YQWdJPFK 17wTqXOhT2NCI94+tUqTa5znUBdKeL/FORRo2cdwnT4NN1YhnrQCt+FwRCwTGEbANc0/ W8+QMc/obG9zrTwSa4hFbHV7/E49f2hy6MJ8S2c8+upWrPL8XVPmaUxp4wBKU4bEEXB6 rJiFunhlHQKN0FVJLQ6tt5xKWH/skqjQU01dHj4CxwZ/yuApsUw75a+uvSpET9kTQBS+ 6A+Q==
MIME-Version: 1.0
In-Reply-To: <7fca2500-d62e-e251-c832-bb6bf2b5f03d@SystematicSw.ab.ca>
References: <CAD8GWstEefcC-w-x7gL0iE2KC8zXUjV2ZbcF9NTmMdqvN2OiVw AT mail DOT gmail DOT com> <92c7e8c2-c440-1bb8-f329-23951d10dffe AT gmail DOT com> <CAD8GWsv60NNtaAy_4rDfKUDGMEC4UgfiOMZFzAVng2908KPaFg AT mail DOT gmail DOT com> <2ec22a55-c5d6-d425-02fe-ec9508a30275 AT obj-sys DOT com> <CAD8GWsv9JoK1-nXnKzBUL3iqPf4k=4n1h9UpZA+ZLnOXU1Da0g AT mail DOT gmail DOT com> <7fca2500-d62e-e251-c832-bb6bf2b5f03d AT SystematicSw DOT ab DOT ca>
From: Lee <ler762 AT gmail DOT com>
Date: Wed, 9 Jan 2019 19:07:47 -0500
Message-ID: <CAD8GWst3657zmrgRQhc4+4Vj3uR0YYfeUnaxVTLZ51GNJ-jXVw@mail.gmail.com>
Subject: Re: i686-w64-mingw32-gcc: LC_MESSAGES
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

On 1/9/19, Brian Inglis  wrote:
>
> On 2019-01-09 12:43, Lee wrote:
>> On 1/9/19, Douglas Coup  wrote:
>>>
>>> On 1/9/2019 1:14 PM, Lee wrote:
>>>> On 1/9/19, JonY  wrote:
>>>>> On 1/8/19 9:26 PM, Lee wrote:
>>>>>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html
>>>>>> has a note for LC_MESSAGES:
>>>>>> The functionality described is an extension to the ISO C standard.
>>>>>> Application developers may make use of an extension as it is
>>>>>> supported on all POSIX.1-2017-conforming systems.
>>>>>> i686-w64-mingw32-gcc doesn't have LC_MESSAGES defined.
>>>>>> Is that an oversight, something missing in windows, or .. ??
>>>>> Windows MSVCR isn't POSIX nor ISO C compliant, so you shouldn't be
>>>>> referring to opengroups, only against MSDN.
>>>> What's a Windows MSVCR?
>>>> Since the same program compiled with cygwins' gcc has LC_MESSAGES
>>>> defined, I was guessing it was just a library thing and maybe it just
>>>> hadn't been implemented in the mingw libraries yet.. but it sounds
>>>> like it's not an oversight & Microsoft needs to support LC_MESSAGES
>>>> before i686-w64-mingw32-gcc will.  Is that about right?
>>> MSVCR = MicroSoft Visual C Run-time (I think)
>> Meaning i686-w64-mingw32-gcc uses the Microsoft libraries vs. cygwin
>> gcc using posix compliant libraries?  Implying LC_MESSAGES not being
>> defined is yet another instance of Microsoft not following accepted
>> standards?
>> The background for my question is
>> https://github.com/htacg/tidy-html5/issues/770
>> Tidy removed the setlocale call from the library init function, so if
>> users want a specific locale/language they're going to have to set it
>> up themselves.
>> I'd like to update the tidylib example code showing how to set the
>> language, but
>>   setlocale(LC_ALL, "");
>>   tidySetLanguage( setlocale(LC_MESSAGES, NULL) );
>> probably isn't a good example if LC_MESSAGES is missing on some systems.
>
> You have to convert your messages to Windows message resources in your
> build, then link and package Windows message resources with non-POSIX
> compliant exes, or add a POSIX message implementation to your exes.

I'm just trying to come up with example code for how to set the locale
& language in the tidylib documentation; thankfully, me building a
native windows version of tidy isn't the goal..  I was just trying out
code that worked under cygwin & was a bit surprised it wouldn't even
compile for windows.  But it seems to be a windows limitation, so
[snip snarky comment]

Regards,
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019