mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
This CL copies to each package of go.sys the files from syscall it will need.
Different directories have different files, but these:
mkall.sh
str.go
syscall.go
mksyscall.pl
race.go
race0.go
syscall_test.go
are copied to all three.
No changes yet, these are just copies. They are not ready to use yet:
package names are wrong, for starters. But this clean copy will make
it easier to follow the changes as the packages are enabled.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126960043
33 lines
580 B
Perl
Executable File
33 lines
580 B
Perl
Executable File
#!/usr/bin/env perl
|
|
# 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.
|
|
#
|
|
# Generate system call table for Darwin from sys/syscall.h
|
|
|
|
use strict;
|
|
|
|
my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
|
|
|
|
print <<EOF;
|
|
// $command
|
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
|
|
|
package syscall
|
|
|
|
const (
|
|
EOF
|
|
|
|
while(<>){
|
|
if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
|
|
my $name = $1;
|
|
my $num = $2;
|
|
$name =~ y/a-z/A-Z/;
|
|
print " SYS_$name = $num;"
|
|
}
|
|
}
|
|
|
|
print <<EOF;
|
|
)
|
|
EOF
|