summaryrefslogtreecommitdiff
path: root/misc/cgo/testcdefs/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/testcdefs/main.go')
-rw-r--r--misc/cgo/testcdefs/main.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/cgo/testcdefs/main.go b/misc/cgo/testcdefs/main.go
new file mode 100644
index 000000000..9231741ad
--- /dev/null
+++ b/misc/cgo/testcdefs/main.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "os"
+
+func test() int32 // in main.c
+
+func main() {
+ os.Exit(int(test()))
+}