aboutsummaryrefslogtreecommitdiffhomepage
path: root/ext/mksysnum_linux.pl
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-19 15:51:56 +0900
committerOphestra <cat@gensokyo.uk>2026-10-19 15:51:56 +0900
commitcfad02947d33ed17a1857ab1b33c7fd44cad8dc9 (patch)
tree18553e0550ffd5d0c81a440a0d30daed1cdb646d /ext/mksysnum_linux.pl
parent58913f00845903aa2068f6cb0778baa563d58d14 (diff)
ext: add additional constants
This removes the syscall cutoff thresholds, instead declaring all syscall number constants in package ext. This also removes two constants from package container which were inadvertently exported for 386 and amd64. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'ext/mksysnum_linux.pl')
-rwxr-xr-xext/mksysnum_linux.pl11
1 files changed, 1 insertions, 10 deletions
diff --git a/ext/mksysnum_linux.pl b/ext/mksysnum_linux.pl
index 22ec3fcf..1b381b28 100755
--- a/ext/mksysnum_linux.pl
+++ b/ext/mksysnum_linux.pl
@@ -7,13 +7,6 @@ use strict;
use POSIX ();
my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
-my $uname_arch = (POSIX::uname)[4];
-my %syscall_cutoff_arch = (
- "x86" => 340,
- "x86_64" => 302,
- "aarch64" => 281,
- "riscv64" => 281,
-);
print <<EOF;
// $command
@@ -21,8 +14,6 @@ print <<EOF;
package ext
-import . "syscall"
-
var syscallNum = map[string]SyscallNum{
EOF
@@ -38,7 +29,7 @@ sub fmt {
}
(my $name_upper = $name) =~ y/a-z/A-Z/;
$num = $num + $offset;
- if($num > $syscall_cutoff_arch{$uname_arch} && $state == 0){ # not wired in Go standard library
+ if($state == 0){ # not wired in Go standard library
print " SYS_$name_upper = $num\n";
}
elsif($state == -1){