From 5b88b625620b88fc6a298a30c0142df307e53e92 Mon Sep 17 00:00:00 2001 From: Patrick Bendorf Date: Mon, 29 Feb 2016 13:19:43 +0100 Subject: [PATCH] ccwrap: fix build with non-english locale set short explanation: after setting up cygwin on my systems the default locale is set to "de_DE.UTF-8". this leads to ccwrap not picking up certain "-isystem" arguments, which in turn leads to "stddef.h: no such file or directory". this breaks the build process for systems having non english locale. ccwrap scans the output of the first compiler invocation (line 21) for some specific english output on and around line 43. i changed the patch to check uname -o for cygwin string and set the locale to either C or C.UTF-8 --- winsup/ccwrap | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/winsup/ccwrap b/winsup/ccwrap index 7580e7a3b..2f1fd3a98 100755 --- a/winsup/ccwrap +++ b/winsup/ccwrap @@ -12,6 +12,11 @@ if ($ARGV[0] ne '++') { $cxx = 1; } die "$0: $ccorcxx environment variable does not exist\n" unless exists $ENV{$ccorcxx}; +if (`uname -o` =~ /cygwin/i) { + $ENV{'LANG'} = 'C.UTF-8'; +} else { + $ENV{'LANG'} = 'C'; +} my @compiler = split ' ', $ENV{$ccorcxx}; if ("@ARGV" !~ / -nostdinc/o) { my $fd;