1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:20:22 -07:00
go/misc/cgo/testcdefs
Matthew Dempsky f7a8adbd51 cmd/cgo: fix handling of defs_linux.go
Instead of including <sys/types.h> to get size_t, instead include
the ISO C standard <stddef.h> header, which defines fewer additional
types at risk of colliding with the user code.  In particular, this
prevents collisions between <sys/types.h>'s userspace definitions with
the kernel definitions needed by defs_linux.go.

Also, -cdefs mode uses #pragma pack, so we can keep misaligned fields.

Fixes #8477.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/120610043
2014-08-05 18:12:32 -07:00
..
cdefstest.c cmd/cgo: fix handling of defs_linux.go 2014-08-05 18:12:32 -07:00
cdefstest.go cmd/cgo: fix handling of defs_linux.go 2014-08-05 18:12:32 -07:00
main.c cmd/cgo: fix handling of defs_linux.go 2014-08-05 18:12:32 -07:00
main.go cmd/cgo: fix handling of array of pointers when using clang 2013-11-07 15:24:51 -05:00
test.bash misc/cgo/testcdefs: rm correct file in test.bash 2013-12-10 12:06:24 +11:00