diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-03-13 12:54:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 12:54:22 -0400 |
commit | c281ee3b61e8ab53ff118866d72618ae8cce582b (patch) | |
tree | 776e7bdf6c8bfbb9a1dee5976496ab065959991f /vendor/golang.org/x/sys/unix/mksyscall.pl | |
parent | 3ada7a41a7fb13abef19dd63dc56b720900dbaa9 (diff) | |
download | chat-c281ee3b61e8ab53ff118866d72618ae8cce582b.tar.gz chat-c281ee3b61e8ab53ff118866d72618ae8cce582b.tar.bz2 chat-c281ee3b61e8ab53ff118866d72618ae8cce582b.zip |
Updating server dependancies. Also adding github.com/jaytaylor/html2text and gopkg.in/gomail.v2 (#5748)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mksyscall.pl')
-rwxr-xr-x | vendor/golang.org/x/sys/unix/mksyscall.pl | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl index b1e7766da..34f8ef829 100755 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl @@ -29,6 +29,7 @@ my $openbsd = 0; my $netbsd = 0; my $dragonfly = 0; my $arm = 0; # 64-bit value should use (even, odd)-pair +my $tags = ""; # build tags if($ARGV[0] eq "-b32") { $_32bit = "big-endian"; @@ -57,14 +58,14 @@ if($ARGV[0] eq "-arm") { $arm = 1; shift; } - -if($ARGV[0] =~ /^-/) { - print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n"; - exit 1; +if($ARGV[0] eq "-tags") { + shift; + $tags = $ARGV[0]; + shift; } -if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { - print STDERR "GOARCH or GOOS not defined in environment\n"; +if($ARGV[0] =~ /^-/) { + print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n"; exit 1; } @@ -132,7 +133,6 @@ while(<>) { # Prepare arguments to Syscall. my @args = (); - my @uses = (); my $n = 0; foreach my $p (@in) { my ($name, $type) = parseparam($p); @@ -143,14 +143,12 @@ while(<>) { $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; push @args, "uintptr(unsafe.Pointer(_p$n))"; - push @uses, "use(unsafe.Pointer(_p$n))"; $n++; } elsif($type eq "string") { print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; $text .= "\tvar _p$n *byte\n"; $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; push @args, "uintptr(unsafe.Pointer(_p$n))"; - push @uses, "use(unsafe.Pointer(_p$n))"; $n++; } elsif($type =~ /^\[\](.*)/) { # Convert slice into pointer, length. @@ -185,7 +183,7 @@ while(<>) { } } elsif($type eq "int64" && $_32bit ne "") { if(@args % 2 && $arm) { - # arm abi specifies 64-bit argument uses + # arm abi specifies 64-bit argument uses # (even, odd) pair push @args, "0" } @@ -278,11 +276,8 @@ while(<>) { } else { $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; } - foreach my $use (@uses) { - $text .= "\t$use\n"; - } $text .= $body; - + if ($plan9 && $ret[2] eq "e1") { $text .= "\tif int32(r0) == -1 {\n"; $text .= "\t\terr = e1\n"; @@ -307,7 +302,7 @@ print <<EOF; // $cmdline // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT -// +build $ENV{'GOARCH'},$ENV{'GOOS'} +// +build $tags package unix |