This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ccwrap: fix build with non-english locale set


Hi Patrick,

On Feb 29 08:12, Patrick Bendorf wrote:
> /winsup/
> * ccwrap: fix build with non-english locale set

First of all, why fix it?  Without at least a short explanation what you
observe without this patch, this change seems arbitrary.

> ---
>  winsup/ccwrap | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/winsup/ccwrap b/winsup/ccwrap
> index 7580e7a..ef83085 100755
> --- a/winsup/ccwrap
> +++ b/winsup/ccwrap
> @@ -12,6 +12,7 @@ if ($ARGV[0] ne '++') {
>      $cxx = 1;
>  }
>  die "$0: $ccorcxx environment variable does not exist\n" unless exists
> $ENV{$ccorcxx};
> +$ENV{'LANG'} = 'C.UTF-8';
>  my @compiler = split ' ', $ENV{$ccorcxx};
>  if ("@ARGV" !~ / -nostdinc/o) {
>      my $fd;
> --
> 2.7.0

That won't work nicely for non-Cygwin build systems.  When cross
building Cygwin on, e.g., Linux, "C.UTF-8" is an unrecognized locale.
Ideally the above would test for the current build system being Cygwin
and use "C.UTF-8" on Cygwin, "C" otherwise.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]