gc: align structs according to max alignment of fields
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260
Fixes #482.
Fixes #609.
R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index b0fa389..37c8103 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -306,6 +306,7 @@
*/
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
#define nil ((void*)0)
+#define offsetof(s,m) (uint32)(&(((s*)0)->m))
/*
* known to compiler