]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: Fix generator for Linux syscalls.
authorBenoit Sigoure <tsunanet@gmail.com>
Mon, 29 Feb 2016 05:30:32 +0000 (21:30 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 29 Feb 2016 17:28:00 +0000 (17:28 +0000)
In golang.org/cl/14449 the `getdents' system call got changed to use
_SYS_getdents as a layer of indirection instead of SYS_GETDENTS64 for
compatibility with mips64, but this broke mksyscall.pl, which then
died with with:
  syscall_linux.go:840: malformed //sys declaration

Change-Id: Icb61965d8730f6e81f9fb0fa28c7bab635470f09
Reviewed-on: https://go-review.googlesource.com/20051
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/mksyscall.pl

index 96437fe69c96578e7f6151e83cbefecb57aa18ef..6ee7c3c3e7d2fde9de888969a935e9860afdcb5f 100755 (executable)
@@ -100,7 +100,7 @@ while(<>) {
        # Line must be of the form
        #       func Open(path string, mode int, perm int) (fd int, errno error)
        # Split into name, in params, out params.
-       if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
+       if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)_?SYS_[A-Z0-9_]+))?$/) {
                print STDERR "$ARGV:$.: malformed //sys declaration\n";
                $errors = 1;
                next;