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_solaris.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_solaris.pl')
-rwxr-xr-x | vendor/golang.org/x/sys/unix/mksyscall_solaris.pl | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl index 06bade768..939c8a791 100755 --- a/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl @@ -12,7 +12,7 @@ # * The parameter lists must give a type for each argument: # the (x, y, z int) shorthand is not allowed. # * If the return parameter is an error number, it must be named err. -# * If go func name needs to be different than its libc name, +# * If go func name needs to be different than its libc name, # * or the function is not in libc, name could be specified # * at the end, after "=" sign, like # //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt @@ -22,6 +22,7 @@ use strict; my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV); my $errors = 0; my $_32bit = ""; +my $tags = ""; # build tags binmode STDOUT; @@ -32,14 +33,14 @@ if($ARGV[0] eq "-b32") { $_32bit = "little-endian"; shift; } - -if($ARGV[0] =~ /^-/) { - print STDERR "usage: mksyscall_solaris.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_solaris.pl [-b32 | -l32] [-tags x,y] [file ...]\n"; exit 1; } @@ -138,7 +139,6 @@ while(<>) { # Prepare arguments to Syscall. my @args = (); - my @uses = (); my $n = 0; foreach my $p (@in) { my ($name, $type) = parseparam($p); @@ -149,14 +149,12 @@ while(<>) { $text .= "\t_p$n, $errvar = $strconvfunc($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 $strconvtype\n"; $text .= "\t_p$n, _ = $strconvfunc($name)\n"; push @args, "uintptr(unsafe.Pointer(_p$n))"; - push @uses, "use(unsafe.Pointer(_p$n))"; $n++; } elsif($type =~ /^\[\](.*)/) { # Convert slice into pointer, length. @@ -243,9 +241,6 @@ while(<>) { } else { $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; } - foreach my $use (@uses) { - $text .= "\t$use\n"; - } $text .= $body; if ($do_errno) { @@ -265,7 +260,7 @@ print <<EOF; // $cmdline // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT -// +build $ENV{'GOARCH'},$ENV{'GOOS'} +// +build $tags package $package |