X-Recipient: archive-cygwin@delorie.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:from:date:message-id:subject:to
	:content-type; q=dns; s=default; b=X+dQZMSmqwn8KZtNT0ZfXKW7mKBSK
	70vP03LB459RtE3qdrA9ojMoi2e0f7vHPId628LmIh7FxxU31+38gGCyVoK/0RoO
	57BJ8VHsA09wHEAHML19hOWB8KQkcuvqfbvQOfbDStEB/wm8fGU1+BFYkdqvHDll
	DY+IsbSVaxuABw=
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:from:date:message-id:subject:to
	:content-type; s=default; bh=Odq7Qy76RMDPlynV5lyQFw9ra3o=; b=Xtf
	8nvN8TnuFRIZlYA1TleWHAfjFX5FdGyxK3dxRR0YFnzdfHiJYy66APvZSMblTsjw
	qv14BNv/DbnbXcYVicFWNqNdmoMZpzB2JLlGUfoL/urQlrteg+XqTaEx2fEXdy7G
	UEQ3z3WA2B0X3qahGBSqpqcwA5xuc6tKqSpvUSnk=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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=lee, Lee
X-HELO: mail-it1-f173.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20161025;        h=mime-version:from:date:message-id:subject:to;        bh=e897hXQoacjTfEjGpYWvJ8Ldf7eX6M4b/FUGHcPP4RE=;        b=p1q8ljfHArWcG9cBHTrRHnxpIUnxveewS5pmKrzcT1EwdQ1W2o6UG8jr+zuwTgz9O4         PZzBcvI0oNmssXl6ot4WznxzuTRxMSFKyIMpqokHlYdTLEW79YlMYehz/LKTn1ZmpZjd         nZB6RvIJjKNK0jgbFvdY/iCQqKQSmZQnyCs0qnI9Xl5a0H/57ytjOvzKC5s9TNNULdHh         aMAH65i1L71Pnv8B2L6uGwMMfjKCu+5oTrIIeI6bFDpinojrU6JGTmBwudZp11iW8YqS         HEqSxuCRn2laMbhNkaKAKZx6pI4zgbYGqMxM+ZuksZVpBtA6WsZV3b+Pk5IAk0WJnMQx         9OMQ==
MIME-Version: 1.0
From: Lee <ler762@gmail.com>
Date: Tue, 8 Jan 2019 16:26:27 -0500
Message-ID: <CAD8GWstEefcC-w-x7gL0iE2KC8zXUjV2ZbcF9NTmMdqvN2OiVw@mail.gmail.com>
Subject: i686-w64-mingw32-gcc: LC_MESSAGES
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes

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 .. ??


$ cat lcmessages.c
#include <stdio.h>
#include <locale.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, char **argv )
{
  char *s, *lang;
  lang = getenv("LANG");
  printf("  LANG=%s  initial locale: %s\n", lang, setlocale(LC_ALL, NULL));

  s = setlocale(LC_ALL, "");
  printf("after 'setlocale(LC_ALL, \"\");'                 locale=%s\n", s);
#ifdef LC_MESSAGES
  s = setlocale(LC_MESSAGES, "de_DE.utf8");
  printf("after 'setlocale(LC_MESSAGES, \"de_DE.utf8\");'
locale=%s\n", setlocale(LC_ALL, NULL));
#else
  printf("LC_MESSAGES is not defined\n");
#endif
}

$ gcc lcmessages.c

$ ./a
  LANG=en_US.UTF-8  initial locale: C
after 'setlocale(LC_ALL, "");'
locale=C/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8
after 'setlocale(LC_MESSAGES, "de_DE.utf8");'
locale=C/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/de_DE.utf8

$ i686-w64-mingw32-gcc lcmessages.c

$ ./a
  LANG=en_US.UTF-8  initial locale: C
after 'setlocale(LC_ALL, "");'                 locale=English_United States.1252
LC_MESSAGES is not defined

Thanks,
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

