]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] syscall: re-generate using cgo compiled by gc, fix test failures
authorShenghou Ma <minux@golang.org>
Thu, 14 Aug 2014 16:01:21 +0000 (12:01 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 14 Aug 2014 16:01:21 +0000 (12:01 -0400)
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/127320043

src/pkg/syscall/syscall_linux_power64x.go
src/pkg/syscall/types_linux.go
src/pkg/syscall/zerrors_linux_power64.go
src/pkg/syscall/zerrors_linux_power64le.go
src/pkg/syscall/zsyscall_linux_power64.go
src/pkg/syscall/zsyscall_linux_power64le.go
src/pkg/syscall/ztypes_linux_power64.go
src/pkg/syscall/ztypes_linux_power64le.go

index dbe37c44e10b05fd471b2291292e1ce1e8d1f155..c0ea660d4ffc159fa093fab3a3a7b78b87710643 100644 (file)
@@ -15,7 +15,7 @@ package syscall
 //sysnb        Getegid() (egid int)
 //sysnb        Geteuid() (euid int)
 //sysnb        Getgid() (gid int)
-//sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb        Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
 //sysnb        Getuid() (uid int)
 //sys  Ioperm(from int, num int, on int) (err error)
 //sys  Iopl(level int) (err error)
index 8ea499246f57c0553d69b20250ccefaaac266dfe..5e9f698cf1b2cad306ae348d41bd08b48ace8739 100644 (file)
@@ -77,8 +77,8 @@ struct sockaddr_any {
 // copied from /usr/include/linux/un.h
 struct my_sockaddr_un {
        sa_family_t sun_family;
-#ifdef __ARM_EABI__
-       // on ARM char is by default unsigned
+#if defined(__ARM_EABI__) || defined(__powerpc64__)
+       // on ARM and PPC char is by default unsigned
        signed char sun_path[108];
 #else
        char sun_path[108];
@@ -87,6 +87,8 @@ struct my_sockaddr_un {
 
 #ifdef __ARM_EABI__
 typedef struct user_regs PtraceRegs;
+#elif defined(__powerpc64__)
+typedef struct pt_regs PtraceRegs;
 #else
 typedef struct user_regs_struct PtraceRegs;
 #endif
index 9409bdba3203a85f14041942b12e68a88dbc6daf..15e0770c18bea89a94d3becb50ecf28c37355690 100644 (file)
@@ -353,7 +353,7 @@ const (
        F_GETFD                          = 0x1
        F_GETFL                          = 0x3
        F_GETLEASE                       = 0x401
-       F_GETLK                          = 0xc
+       F_GETLK                          = 0x5
        F_GETLK64                        = 0xc
        F_GETOWN                         = 0x9
        F_GETOWN_EX                      = 0x10
@@ -671,15 +671,6 @@ const (
        MAP_SHARED                       = 0x1
        MAP_STACK                        = 0x20000
        MAP_TYPE                         = 0xf
-       MCAST_BLOCK_SOURCE               = 0x2b
-       MCAST_EXCLUDE                    = 0x0
-       MCAST_INCLUDE                    = 0x1
-       MCAST_JOIN_GROUP                 = 0x2a
-       MCAST_JOIN_SOURCE_GROUP          = 0x2e
-       MCAST_LEAVE_GROUP                = 0x2d
-       MCAST_LEAVE_SOURCE_GROUP         = 0x2f
-       MCAST_MSFILTER                   = 0x30
-       MCAST_UNBLOCK_SOURCE             = 0x2c
        MCL_CURRENT                      = 0x2000
        MCL_FUTURE                       = 0x4000
        MNT_DETACH                       = 0x2
index de3b442a15b610b0edc692761af9171031800062..fdecdf24dd3e83114f6070652baf8d8b467d2433 100644 (file)
@@ -353,7 +353,7 @@ const (
        F_GETFD                          = 0x1
        F_GETFL                          = 0x3
        F_GETLEASE                       = 0x401
-       F_GETLK                          = 0xc
+       F_GETLK                          = 0x5
        F_GETLK64                        = 0xc
        F_GETOWN                         = 0x9
        F_GETOWN_EX                      = 0x10
@@ -675,15 +675,6 @@ const (
        MAP_SHARED                       = 0x1
        MAP_STACK                        = 0x20000
        MAP_TYPE                         = 0xf
-       MCAST_BLOCK_SOURCE               = 0x2b
-       MCAST_EXCLUDE                    = 0x0
-       MCAST_INCLUDE                    = 0x1
-       MCAST_JOIN_GROUP                 = 0x2a
-       MCAST_JOIN_SOURCE_GROUP          = 0x2e
-       MCAST_LEAVE_GROUP                = 0x2d
-       MCAST_LEAVE_SOURCE_GROUP         = 0x2f
-       MCAST_MSFILTER                   = 0x30
-       MCAST_UNBLOCK_SOURCE             = 0x2c
        MCL_CURRENT                      = 0x2000
        MCL_FUTURE                       = 0x4000
        MNT_DETACH                       = 0x2
index 5f8feccc5c04f860150a4a60aec20a14b5f7e0ae..7808059cc8b76facf8b9803d02057eb2e4bd053a 100644 (file)
@@ -1431,7 +1431,7 @@ func Getgid() (gid int) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+       _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
        if e1 != 0 {
                err = e1
        }
index 5f8feccc5c04f860150a4a60aec20a14b5f7e0ae..7808059cc8b76facf8b9803d02057eb2e4bd053a 100644 (file)
@@ -1431,7 +1431,7 @@ func Getgid() (gid int) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+       _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
        if e1 != 0 {
                err = e1
        }
index 5a34068bc1ed1dfa8df1d418c45a85672acb53da..204d8068532cc42b6badc43dd4ca4b2c1b9eadc8 100644 (file)
@@ -71,22 +71,22 @@ type Utimbuf struct {
 }
 
 type Rusage struct {
-       Utime  Timeval
-       Stime  Timeval
-       Anon0  [8]byte
-       Anon1  [8]byte
-       Anon2  [8]byte
-       Anon3  [8]byte
-       Anon4  [8]byte
-       Anon5  [8]byte
-       Anon6  [8]byte
-       Anon7  [8]byte
-       Anon8  [8]byte
-       Anon9  [8]byte
-       Anon10 [8]byte
-       Anon11 [8]byte
-       Anon12 [8]byte
-       Anon13 [8]byte
+       Utime    Timeval
+       Stime    Timeval
+       Maxrss   int64
+       Ixrss    int64
+       Idrss    int64
+       Isrss    int64
+       Minflt   int64
+       Majflt   int64
+       Nswap    int64
+       Inblock  int64
+       Oublock  int64
+       Msgsnd   int64
+       Msgrcv   int64
+       Nsignals int64
+       Nvcsw    int64
+       Nivcsw   int64
 }
 
 type Rlimit struct {
index 647755cb12653f289ce27a8e61791231c605bc67..df481f5c760275e69e546b9a7434314d00023495 100644 (file)
@@ -71,22 +71,22 @@ type Utimbuf struct {
 }
 
 type Rusage struct {
-       Utime  Timeval
-       Stime  Timeval
-       Anon0  [8]byte
-       Anon1  [8]byte
-       Anon2  [8]byte
-       Anon3  [8]byte
-       Anon4  [8]byte
-       Anon5  [8]byte
-       Anon6  [8]byte
-       Anon7  [8]byte
-       Anon8  [8]byte
-       Anon9  [8]byte
-       Anon10 [8]byte
-       Anon11 [8]byte
-       Anon12 [8]byte
-       Anon13 [8]byte
+       Utime    Timeval
+       Stime    Timeval
+       Maxrss   int64
+       Ixrss    int64
+       Idrss    int64
+       Isrss    int64
+       Minflt   int64
+       Majflt   int64
+       Nswap    int64
+       Inblock  int64
+       Oublock  int64
+       Msgsnd   int64
+       Msgrcv   int64
+       Nsignals int64
+       Nvcsw    int64
+       Nivcsw   int64
 }
 
 type Rlimit struct {