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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=m29iEfvipGBUSHqX +VR+kWJuJbKP64fXcqydp3i7dsMYxDZm6SWj0DorcAmOMTjgelsOeGYZp6Qgph8x BGgs1M1iGvE/ykHZUsfA7rNvMbmt3J/n/AbMf/seidp9VdZFbaFT4mW4dzhabCC6 tuxXdGzz9YBcIWrH6Edvs8HMYt0= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=V0Q1LkQ0xmB4jyTLGXkSr2 2+lr8=; b=A+2oTEzS9oZOu7rqS31DVEDEK+XLYCz4/835u2panbCgTVCWdLWWFX h76GMaGWaWreWxnwl2py4YLyRRBsEN4A8Q4FxrR9IMsH8FVjQG2OE1TIR8pa0TiC d/D1lm4sgx99R5mGLGl4kkGAZdORBHr9NR3HWAfudE4aaGQjx5+5U= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Canada, canada, Take, jony X-HELO: smtp-out-no.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: i686-w64-mingw32-gcc: LC_MESSAGES To: cygwin AT cygwin DOT com References: <92c7e8c2-c440-1bb8-f329-23951d10dffe AT gmail DOT com> <2ec22a55-c5d6-d425-02fe-ec9508a30275 AT obj-sys DOT com> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <7fca2500-d62e-e251-c832-bb6bf2b5f03d@SystematicSw.ab.ca> Date: Wed, 9 Jan 2019 16:41:23 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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