diff options
author | Ian Lance Taylor <iant@golang.org> | 2015-05-11 20:49:32 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2015-05-13 00:40:49 +0000 |
commit | 08ba7dbdfdf0a2824ee122a6214e0263431a6ff0 (patch) | |
tree | beda4ad800e14b347de10d234b9a2e8648658f83 /src/syscall | |
parent | a4f4a46c28fdf6a2b0724bd779c9cf1bad32b066 (diff) | |
download | go-git-08ba7dbdfdf0a2824ee122a6214e0263431a6ff0.tar.gz |
syscall: mkerrors.sh: don't define _FILE_OFFSET_BITS if __LP64__
If __LP64__ is defined then the type "long" is 64-bits, and there is
no need to explicitly request _FILE_OFFSET_BITS == 64. This changes
the definitions of F_GETLK, F_SETLK, and F_SETLKW on PPC to the values
that the kernel requires. The values used in C when _FILE_OFFSET_BITS
== 64 are corrected by the glibc fcntl function before making the
system call.
With this change, regenerate ppc64le files on Ubuntu trusty.
Change-Id: I8dddbd8a6bae877efff818f5c5dd06291ade3238
Reviewed-on: https://go-review.googlesource.com/9962
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/syscall')
-rwxr-xr-x | src/syscall/mkerrors.sh | 2 | ||||
-rw-r--r-- | src/syscall/zerrors_linux_ppc64le.go | 4 | ||||
-rw-r--r-- | src/syscall/ztypes_linux_ppc64le.go | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/syscall/mkerrors.sh b/src/syscall/mkerrors.sh index d25527bbf9..438de6e5d8 100755 --- a/src/syscall/mkerrors.sh +++ b/src/syscall/mkerrors.sh @@ -87,7 +87,9 @@ includes_FreeBSD=' includes_Linux=' #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE +#ifndef __LP64__ #define _FILE_OFFSET_BITS 64 +#endif #define _GNU_SOURCE #include <bits/sockaddr.h> diff --git a/src/syscall/zerrors_linux_ppc64le.go b/src/syscall/zerrors_linux_ppc64le.go index fdecdf24dd..17c4c4cf3a 100644 --- a/src/syscall/zerrors_linux_ppc64le.go +++ b/src/syscall/zerrors_linux_ppc64le.go @@ -366,9 +366,9 @@ const ( F_SETFD = 0x2 F_SETFL = 0x4 F_SETLEASE = 0x400 - F_SETLK = 0xd + F_SETLK = 0x6 F_SETLK64 = 0xd - F_SETLKW = 0xe + F_SETLKW = 0x7 F_SETLKW64 = 0xe F_SETOWN = 0x8 F_SETOWN_EX = 0xf diff --git a/src/syscall/ztypes_linux_ppc64le.go b/src/syscall/ztypes_linux_ppc64le.go index c6b6f1615d..0de1770f7f 100644 --- a/src/syscall/ztypes_linux_ppc64le.go +++ b/src/syscall/ztypes_linux_ppc64le.go @@ -549,7 +549,7 @@ type Sysinfo_t struct { Totalhigh uint64 Freehigh uint64 Unit uint32 - X_f [0]byte + X_f [0]uint8 Pad_cgo_1 [4]byte } |