aboutsummaryrefslogtreecommitdiff
path: root/libgo/syscalls/sysfile_posix.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-01-21 18:19:03 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-01-21 18:19:03 +0000
commitff5f50c52c421d75940ef9392211e3ab24d71332 (patch)
tree27d8768fb1d25696d3c40b42535eb5e073c278da /libgo/syscalls/sysfile_posix.go
parentd6ed1c8903e728f4233122554bab5910853338bd (diff)
downloadgcc-ff5f50c52c421d75940ef9392211e3ab24d71332.zip
gcc-ff5f50c52c421d75940ef9392211e3ab24d71332.tar.gz
gcc-ff5f50c52c421d75940ef9392211e3ab24d71332.tar.bz2
Remove the types float and complex.
Update to current version of Go library. Update testsuite for removed types. * go-lang.c (go_langhook_init): Omit float_type_size when calling go_create_gogo. * go-c.h: Update declaration of go_create_gogo. From-SVN: r169098
Diffstat (limited to 'libgo/syscalls/sysfile_posix.go')
-rw-r--r--libgo/syscalls/sysfile_posix.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/syscalls/sysfile_posix.go b/libgo/syscalls/sysfile_posix.go
index 1458bf5..655eb73 100644
--- a/libgo/syscalls/sysfile_posix.go
+++ b/libgo/syscalls/sysfile_posix.go
@@ -16,6 +16,7 @@ func libc_open(name *byte, mode int, perm Mode_t) int __asm__ ("open");
func libc_close(fd int) int __asm__ ("close");
func libc_read(fd int, buf *byte, count Size_t) Ssize_t __asm__ ("read");
func libc_write(fd int, buf *byte, count Size_t) Ssize_t __asm__ ("write");
+func libc_fsync(fd int) int __asm__ ("fsync")
func libc_pipe(filedes *int) int __asm__("pipe");
func libc_stat(name *byte, buf *Stat_t) int __asm__ ("stat");
func libc_fstat(fd int, buf *Stat_t) int __asm__ ("fstat");
@@ -87,6 +88,13 @@ func Write(fd int, p []byte) (n int, errno int) {
return;
}
+func Fsync(fd int) (errno int) {
+ if libc_fsync(fd) < 0 {
+ errno = GetErrno()
+ }
+ return
+}
+
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }