]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: remove mksysnum_darwin.pl script
authorTobias Klauser <tklauser@distanz.ch>
Fri, 25 Sep 2020 16:44:58 +0000 (18:44 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Sat, 26 Sep 2020 10:08:43 +0000 (10:08 +0000)
Direct syscalls using syscall numbers are no longer supported on darwin
since Go 1.12, see https://golang.org/doc/go1.12#darwin. Also,
/usr/include/sys/syscall.h is no longer available on recent macOS
versions, so remove the generating script.

Change-Id: I8e2579c3d0e94a61fc041d06280149ec6ccf13e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/257638
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/syscall/mkall.sh
src/syscall/mksysnum_darwin.pl [deleted file]

index 826512a177e192b1ff83aef7cac925878b9252fb..2c2fc453d3847fe38370fd64f6dbb1dbe10c68ea 100755 (executable)
@@ -124,14 +124,12 @@ aix_ppc64)
 darwin_amd64)
        mkerrors="$mkerrors -m64"
        mksyscall="./mksyscall.pl -darwin"
-       mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs"
        mkasm="go run mkasm_darwin.go"
        ;;
 darwin_arm64)
        mkerrors="$mkerrors -m64"
        mksyscall="./mksyscall.pl -darwin"
-       mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs"
        mkasm="go run mkasm_darwin.go"
        ;;
diff --git a/src/syscall/mksysnum_darwin.pl b/src/syscall/mksysnum_darwin.pl
deleted file mode 100755 (executable)
index af21e85..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/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
-// Code generated by the command above; 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