Code review - Issue 103450043: code review 103450043: syscall: regenerate z-files for linuxhttps://codereview.appspot.com/2014-07-30T01:14:17+00:00rietveld
Message from unknown
2014-06-20T08:46:58+00:00mikiourn:md5:d63742a8eda6a46543b24d70722ef623
Message from mikioh.mikioh@gmail.com
2014-06-20T08:47:04+00:00mikiourn:md5:20358e98d2f3cd5d20072192ea7ac271
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go
Message from iant@golang.org
2014-06-20T13:42:18+00:00ianturn:md5:b854466517f694c553bee0bf0a21b20d
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh
File src/pkg/syscall/mkerrors.sh (left):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh#oldcode121
src/pkg/syscall/mkerrors.sh:121: #ifndef MSG_FASTOPEN
Why are you dropping the MSG_FASTOPEN test? It seems to me that we should keep it even if it is not necessary with your kernel version.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh
File src/pkg/syscall/mkerrors.sh (right):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh#newcode93
src/pkg/syscall/mkerrors.sh:93: #include <termios.h>
In the future, please do this kind of rearrangement of header files in a separate CL. It doesn't have anything to do with updating Linux kernel versions.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go
File src/pkg/syscall/types_linux.go (left):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#oldcode35
src/pkg/syscall/types_linux.go:35: #include <sys/resource.h>
Why have you changed from <sys/resource.h> to <linux/resource.h>?
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#oldcode385
src/pkg/syscall/types_linux.go:385: VINTR = C.VINTR
Why are these all going away?
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go
File src/pkg/syscall/types_linux.go (right):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#newcode124
src/pkg/syscall/types_linux.go:124: struct non__glibc_reserved_stat
Why do this? It kind of misses the point of this general procedure, which is to pick up the structs from the header files.
At the very least something like this needs a comment.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#newcode458
src/pkg/syscall/types_linux.go:458: type InotifyEvent C.struct_changeset_b5b8898c7002_inotify_event
This also looks wrong and needs an explanation.
Message from unknown
2014-06-27T01:34:53+00:00mikiourn:md5:5247bef0b18094557de08590a82ace5b
Message from mikioh.mikioh@gmail.com
2014-06-27T01:36:34+00:00mikiourn:md5:bdafd5fd8e17892d67906043b82feffe
ptal
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh
File src/pkg/syscall/mkerrors.sh (left):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh#oldcode121
src/pkg/syscall/mkerrors.sh:121: #ifndef MSG_FASTOPEN
restored
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh
File src/pkg/syscall/mkerrors.sh (right):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/mkerrors.sh#newcode93
src/pkg/syscall/mkerrors.sh:93: #include <termios.h>
si
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go
File src/pkg/syscall/types_linux.go (left):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#oldcode35
src/pkg/syscall/types_linux.go:35: #include <sys/resource.h>
see golang.org/issue/6677, simply cmd/cgo+godefs cannot handle well the union of c, and linux guys modified rusage in {sys,bits}/resource.h to make use of union.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#oldcode385
src/pkg/syscall/types_linux.go:385: VINTR = C.VINTR
now mkerrors.sh can pick up all of them with the latest linux kernel headers. perhaps bits/termios.h has been reorganized between 3.2 and 3.14.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go
File src/pkg/syscall/types_linux.go (right):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#newcode124
src/pkg/syscall/types_linux.go:124: struct non__glibc_reserved_stat
sorry it's a dreg, removed.
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#newcode458
src/pkg/syscall/types_linux.go:458: type InotifyEvent C.struct_changeset_b5b8898c7002_inotify_event
added a comment
Message from iant@golang.org
2014-06-28T00:36:08+00:00ianturn:md5:e904237c6c7f2888fa9770a108f4bf79
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go
File src/pkg/syscall/types_linux.go (left):
https://codereview.appspot.com/103450043/diff/380002/src/pkg/syscall/types_linux.go#oldcode35
src/pkg/syscall/types_linux.go:35: #include <sys/resource.h>
On 2014/06/27 01:36:34, mikio wrote:
> see golang.org/issue/6677, simply cmd/cgo+godefs cannot handle well the union of
> c, and linux guys modified rusage in {sys,bits}/resource.h to make use of union.
Please see if https://codereview.appspot.com/106260044 fixes this problem.
Message from unknown
2014-06-29T00:01:27+00:00mikiourn:md5:3b01211a2faff1473ece365c9b452ab9
Message from mikioh.mikioh@gmail.com
2014-07-30T01:14:17+00:00mikiourn:md5:d2a5727b44c93dd07d0e80598148caa1
*** Abandoned ***