diff options
author | Russ Cox <rsc@golang.org> | 2009-09-30 11:51:08 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-30 11:51:08 -0700 |
commit | 18a7a4b15c90ea6e23dd57a5a5f0eacc0a3d8d4b (patch) | |
tree | 619a699db06e8444c9555f1c0b66ed8e781ee980 /src/cmd/cgo/stdio.go | |
parent | d44e063807468805d0e5768f9a99aa661d20584b (diff) | |
download | golang-18a7a4b15c90ea6e23dd57a5a5f0eacc0a3d8d4b.tar.gz |
cgo: works on amd64.
integrated into Makefiles (see misc/cgo/gmp/Makefile).
R=r
DELTA=1110 (540 added, 525 deleted, 45 changed)
OCL=35153
CL=35158
Diffstat (limited to 'src/cmd/cgo/stdio.go')
-rw-r--r-- | src/cmd/cgo/stdio.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/cmd/cgo/stdio.go b/src/cmd/cgo/stdio.go deleted file mode 100644 index 4f09de799..000000000 --- a/src/cmd/cgo/stdio.go +++ /dev/null @@ -1,27 +0,0 @@ -// 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 main - -// #include <stdio.h> -// #include <stdlib.h> -import "C" - -type File C.FILE; - -func (f *File) Putc(c int) { - C.putc(C.int(c), (*C.FILE)(f)); -} - -func (f *File) Puts(s string) { - p := C.CString(s); - C.fputs(p, (*C.FILE)(f)); - C.free(unsafe.Pointer(p)); -} - -var Stdout = (*File)(C.stdout); - -func main() { - Stdout.Puts("hello, world\n"); -} |