mirror of
https://github.com/golang/go.git
synced 2025-05-18 13:54:40 +00:00
Updates #30228 Change-Id: I4d213c6fe68c47ccb877f13b55128e035f76a26b Reviewed-on: https://go-review.googlesource.com/c/163421 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
23 lines
613 B
Go
23 lines
613 B
Go
// skip
|
|
|
|
// 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>
|
|
|
|
// on mingw, stderr and stdout are defined as &_iob[FILENO]
|
|
// on netbsd, they are defined as &__sF[FILENO]
|
|
// and cgo doesn't recognize them, so write a function to get them,
|
|
// instead of depending on internals of libc implementation.
|
|
FILE *getStdout(void) { return stdout; }
|
|
FILE *getStderr(void) { return stderr; }
|
|
*/
|
|
import "C"
|
|
|
|
var Stdout = (*File)(C.getStdout())
|
|
var Stderr = (*File)(C.getStderr())
|