From: Mikio Hara Date: Tue, 24 Jun 2014 00:20:42 +0000 (+0900) Subject: syscall: regenerate z-files for darwin X-Git-Tag: go1.4beta1~1233 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fbd5ad585d03ee750b7d58a85cf0d40079b28833;p=gostls13.git syscall: regenerate z-files for darwin Updates z-files from 10.7 kernel-based to 10.9 kernel-based. LGTM=iant R=golang-codereviews, bradfitz, iant CC=golang-codereviews https://golang.org/cl/102610045 --- diff --git a/api/except.txt b/api/except.txt index 1a8296635d..99f4397742 100644 --- a/api/except.txt +++ b/api/except.txt @@ -327,3 +327,27 @@ pkg syscall (netbsd-arm), const SizeofIfData = 132 pkg syscall (netbsd-arm), type IfMsghdr struct, Pad_cgo_1 [4]uint8 pkg syscall (netbsd-arm-cgo), const SizeofIfData = 132 pkg syscall (netbsd-arm-cgo), type IfMsghdr struct, Pad_cgo_1 [4]uint8 +pkg syscall (darwin-386), const AF_MAX = 38 +pkg syscall (darwin-386), const ELAST = 105 +pkg syscall (darwin-386), const EVFILT_SYSCOUNT = 12 +pkg syscall (darwin-386), const EVFILT_THREADMARKER = 12 +pkg syscall (darwin-386), const IPV6_FRAGTTL = 120 +pkg syscall (darwin-386), const SYS_MAXSYSCALL = 439 +pkg syscall (darwin-386-cgo), const AF_MAX = 38 +pkg syscall (darwin-386-cgo), const ELAST = 105 +pkg syscall (darwin-386-cgo), const EVFILT_SYSCOUNT = 12 +pkg syscall (darwin-386-cgo), const EVFILT_THREADMARKER = 12 +pkg syscall (darwin-386-cgo), const IPV6_FRAGTTL = 120 +pkg syscall (darwin-386-cgo), const SYS_MAXSYSCALL = 439 +pkg syscall (darwin-amd64), const AF_MAX = 38 +pkg syscall (darwin-amd64), const ELAST = 105 +pkg syscall (darwin-amd64), const EVFILT_SYSCOUNT = 12 +pkg syscall (darwin-amd64), const EVFILT_THREADMARKER = 12 +pkg syscall (darwin-amd64), const IPV6_FRAGTTL = 120 +pkg syscall (darwin-amd64), const SYS_MAXSYSCALL = 439 +pkg syscall (darwin-amd64-cgo), const AF_MAX = 38 +pkg syscall (darwin-amd64-cgo), const ELAST = 105 +pkg syscall (darwin-amd64-cgo), const EVFILT_SYSCOUNT = 12 +pkg syscall (darwin-amd64-cgo), const EVFILT_THREADMARKER = 12 +pkg syscall (darwin-amd64-cgo), const IPV6_FRAGTTL = 120 +pkg syscall (darwin-amd64-cgo), const SYS_MAXSYSCALL = 439 diff --git a/src/pkg/syscall/mkerrors.sh b/src/pkg/syscall/mkerrors.sh index e86ec1107a..1515cfded9 100755 --- a/src/pkg/syscall/mkerrors.sh +++ b/src/pkg/syscall/mkerrors.sh @@ -35,6 +35,36 @@ includes_Darwin=' #include #include #include + +// We keep some constants not supported in OS X Mavericks and beyond +// for the promise of compatibility. +#ifndef F_MARKDEPENDENCY +#define F_MARKDEPENDENCY 0x3c +#endif +#ifndef F_READBOOTSTRAP +#define F_READBOOTSTRAP 0x2e +#endif +#ifndef F_WRITEBOOTSTRAP +#define F_WRITEBOOTSTRAP 0x2f +#endif +#ifndef NOTE_RESOURCEEND +#define NOTE_RESOURCEEND 0x2000000 +#endif +#ifndef SO_RESTRICTIONS +#define SO_RESTRICTIONS 0x1081 +#endif +#ifndef SO_RESTRICT_DENYIN +#define SO_RESTRICT_DENYIN 0x1 +#endif +#ifndef SO_RESTRICT_DENYOUT +#define SO_RESTRICT_DENYOUT 0x2 +#endif +#ifndef SO_RESTRICT_DENYSET +#define SO_RESTRICT_DENYSET 0x80000000 +#endif +#ifndef TCP_MINMSSOVERLOAD +#define TCP_MINMSSOVERLOAD 0x3e8 +#endif ' includes_DragonFly=' diff --git a/src/pkg/syscall/mksysnum_darwin.pl b/src/pkg/syscall/mksysnum_darwin.pl index e3470435d2..30adae0f4e 100755 --- a/src/pkg/syscall/mksysnum_darwin.pl +++ b/src/pkg/syscall/mksysnum_darwin.pl @@ -18,15 +18,41 @@ package syscall const ( EOF +my %syscalls; + 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;" + $syscalls{"SYS_$name"} = "$num"; } } +# We keep some constants not supported in OS X Mavericks and beyond +# for the promise of compatibility. +$syscalls{"SYS_PROFIL"} = 44; +$syscalls{"SYS_ADD_PROFIL"} = 176; +$syscalls{"SYS_ATSOCKET"} = 206; +$syscalls{"SYS_ATGETMSG"} = 207; +$syscalls{"SYS_ATPUTMSG"} = 208; +$syscalls{"SYS_ATPSNDREQ"} = 209; +$syscalls{"SYS_ATPSNDRSP"} = 210; +$syscalls{"SYS_ATPGETREQ"} = 211; +$syscalls{"SYS_ATPGETRSP"} = 212; +$syscalls{"SYS_MKCOMPLEX"} = 216; +$syscalls{"SYS_STATV"} = 217; +$syscalls{"SYS_LSTATV"} = 218; +$syscalls{"SYS_FSTATV"} = 219; +$syscalls{"SYS_GETAUDIT"} = 355; +$syscalls{"SYS_SETAUDIT"} = 356; +$syscalls{"SYS_PID_HIBERNATE"} = 435; +$syscalls{"SYS_PID_SHUTDOWN_SOCKETS"} = 436; + +for my $key (sort {$syscalls{$a} <=> $syscalls{$b} || $a cmp $b} keys %syscalls){ + print "$key = $syscalls{$key};\n"; +} + print <