diff options
author | appilon <apilon@hashicorp.com> | 2019-02-27 16:43:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 16:43:31 -0500 |
commit | 844b5a68d8af4791755b8f0ad293cc99f5959183 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl | |
parent | 303b299eeb6b06e939e35905e4b34cb410dd9dc3 (diff) | |
parent | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (diff) | |
download | terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.gz terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.zst terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.zip |
Merge pull request #27 from terraform-providers/go-modules-2019-02-22
[MODULES] Switch to Go Modules
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl')
-rw-r--r-- | vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl new file mode 100644 index 0000000..6804f41 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/usr/bin/env perl | ||
2 | # Copyright 2009 The Go Authors. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | # | ||
6 | # Generate system call table for DragonFly from master list | ||
7 | # (for example, /usr/src/sys/kern/syscalls.master). | ||
8 | |||
9 | use strict; | ||
10 | |||
11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { | ||
12 | print STDERR "GOARCH or GOOS not defined in environment\n"; | ||
13 | exit 1; | ||
14 | } | ||
15 | |||
16 | my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV); | ||
17 | |||
18 | print <<EOF; | ||
19 | // $command | ||
20 | // Code generated by the command above; see README.md. DO NOT EDIT. | ||
21 | |||
22 | // +build $ENV{'GOARCH'},$ENV{'GOOS'} | ||
23 | |||
24 | package unix | ||
25 | |||
26 | const ( | ||
27 | EOF | ||
28 | |||
29 | while(<>){ | ||
30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ | ||
31 | my $num = $1; | ||
32 | my $proto = $2; | ||
33 | my $name = "SYS_$3"; | ||
34 | $name =~ y/a-z/A-Z/; | ||
35 | |||
36 | # There are multiple entries for enosys and nosys, so comment them out. | ||
37 | if($name =~ /^SYS_E?NOSYS$/){ | ||
38 | $name = "// $name"; | ||
39 | } | ||
40 | if($name eq 'SYS_SYS_EXIT'){ | ||
41 | $name = 'SYS_EXIT'; | ||
42 | } | ||
43 | |||
44 | print " $name = $num; // $proto\n"; | ||
45 | } | ||
46 | } | ||
47 | |||
48 | print <<EOF; | ||
49 | ) | ||
50 | EOF | ||