Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(261)

Unified Diff: misc/cgo/stdio/stdio_netbsd.go

Issue 6261056: code review 6261056: cgo: enable cgo on netbsd/386 and netbsd/amd64 (Closed)
Patch Set: diff -r a98657dda373 https://go.googlecode.com/hg/ Created 12 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « doc/progs/run ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: misc/cgo/stdio/stdio_netbsd.go
===================================================================
new file mode 100644
--- /dev/null
+++ b/misc/cgo/stdio/stdio_netbsd.go
@@ -0,0 +1,16 @@
+// Copyright 2009 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 stdio
+
+/*
+#include <stdio.h>
+
+extern FILE __sF[3];
+*/
+import "C"
+import "unsafe"
+
+var Stdout = (*File)(unsafe.Pointer(&C.__sF[1]))
+var Stderr = (*File)(unsafe.Pointer(&C.__sF[2]))
« no previous file with comments | « doc/progs/run ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b