]> Cypherpunks repositories - gostls13.git/commit
misc/cgo/test: make tests run on windows
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 20 Jan 2012 01:59:44 +0000 (12:59 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 20 Jan 2012 01:59:44 +0000 (12:59 +1100)
commit8d6958fc041eee42e78ba3c20569c71c35795b8b
tree92e7c388f041d3dffd22de4bd30cb4aa4923283c
parent7fc4c07172b7b6feb2da345511ad439fedaf876b
misc/cgo/test: make tests run on windows

- use proper Win64 gcc calling convention when
  calling initcgo on amd64
- increase g0 stack size to 64K on amd64 to make
  it the same as 386
- implement C.sleep
- do not use C.stat, since it is renamed to C._stat by mingw
- use fopen to implement TestErrno, since C.strtol
  always succeeds on windows
- skip TestSetEnv on windows, because os.Setenv
  sets windows process environment, while C.getenv
  inspects internal C runtime variable instead

R=golang-dev, vcc.163, rsc
CC=golang-dev
https://golang.org/cl/5500094
misc/cgo/test/Makefile
misc/cgo/test/basic.go
misc/cgo/test/env.go
misc/cgo/test/issue1560.go
misc/cgo/test/sleep_windows.go [new file with mode: 0644]
src/pkg/runtime/asm_amd64.s
src/run.bash