Skip to content

Commit

Permalink
cgo: arrange for English error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Nov 15, 2009
1 parent 0911913 commit 0238fd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cmd/cgo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func main() {
fatal("unknown architecture %s", arch)
}

// Clear locale variables so gcc emits English errors [sic].
os.Setenv("LANG", "en_US.UTF-8");
os.Setenv("LC_ALL", "C");
os.Setenv("LC_CTYPE", "C");

p := openProg(input);
for _, cref := range p.Crefs {
// Convert C.ulong to C.unsigned long, etc.
Expand Down

0 comments on commit 0238fd8

Please sign in to comment.