summaryrefslogtreecommitdiff
path: root/src/lib/syscall/mksignal
blob: abf26081570bc5b76f8ff4871d448f5314a58f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright 2009 The Go Authors.  All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

my $command = "mksignal ". join(' ', @ARGV);

print <<EOF;
// Generated by mksignal; DO NOT EDIT.
// $command

package syscall

export const(
EOF

while(<>){
	next if /SIGSTKSZ/;
	next if /SIGEV_/;
	if(/^#define\s+(SIG[^_\s]\w*)\s+([0-9]+)/){
		print "	$1 = $2;\n";
	}
}

print <<EOF;
)
EOF