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

Delta Between Two Patch Sets: misc/cgo/stdio/stdio.go

Issue 5847068: code review 5847068: misc/cgo/stdio: make it work on Windows (Closed)
Left Patch Set: diff -r 62f087306b18 https://code.google.com/p/go/ Created 12 years, 8 months ago
Right Patch Set: diff -r e24d688078cd https://code.google.com/p/go/ Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | misc/cgo/stdio/stdio_netbsd.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // skip
2
1 // Copyright 2009 The Go Authors. All rights reserved. 3 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
4 6
5 package stdio 7 package stdio
6 8
7 /* 9 /*
8 #include <stdio.h> 10 #include <stdio.h>
9 11
10 // on mingw, stderr and stdout are defined as &_iob[FILENO] 12 // on mingw, stderr and stdout are defined as &_iob[FILENO]
11 // on netbsd, they are defined as &__sF[FILENO] 13 // on netbsd, they are defined as &__sF[FILENO]
12 // and cgo doesn't recognize them, so write a function to get them, 14 // and cgo doesn't recognize them, so write a function to get them,
13 // instead of depending on internals of libc implementation. 15 // instead of depending on internals of libc implementation.
14 FILE *getStdout(void) { return stdout; } 16 FILE *getStdout(void) { return stdout; }
15 FILE *getStderr(void) { return stderr; } 17 FILE *getStderr(void) { return stderr; }
16 */ 18 */
17 import "C" 19 import "C"
18 20
19 var Stdout = (*File)(C.getStdout()) 21 var Stdout = (*File)(C.getStdout())
20 var Stderr = (*File)(C.getStderr()) 22 var Stderr = (*File)(C.getStderr())
LEFTRIGHT

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