1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:24:41 -07:00

cgo: arrange for English error messages

Fixes #21.

R=r
https://golang.org/cl/155048
This commit is contained in:
Russ Cox 2009-11-15 12:57:21 -08:00
parent 091191336a
commit 0238fd836f

View File

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