• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2009 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package stdio
6
7/*
8#include <stdio.h>
9
10// on mingw, stderr and stdout are defined as &_iob[FILENO]
11// on netbsd, they are defined as &__sF[FILENO]
12// and cgo doesn't recognize them, so write a function to get them,
13// instead of depending on internals of libc implementation.
14FILE *getStdout(void) { return stdout; }
15FILE *getStderr(void) { return stderr; }
16*/
17import "C"
18
19var Stdout = (*File)(C.getStdout())
20var Stderr = (*File)(C.getStderr())
21