Commit 2bb6f76a authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/cgo: add header guard for boilerplate in export header file

Change-Id: If53563f3477222fe7409011b8780bb0926567251
Reviewed-on: https://go-review.googlesource.com/9767Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent a52dc9fc
......@@ -1325,6 +1325,9 @@ func (p *Package) gccExportHeaderProlog() string {
const gccExportHeaderProlog = `
/* Start of boilerplate cgo prologue. */
#ifndef GO_CGO_PROLOGUE_H
#define GO_CGO_PROLOGUE_H
typedef signed char GoInt8;
typedef unsigned char GoUint8;
typedef short GoInt16;
......@@ -1351,6 +1354,8 @@ typedef void *GoChan;
typedef struct { void *t; void *v; } GoInterface;
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
#endif
/* End of boilerplate cgo prologue. */
`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment