~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/syscall/mksysnum_darwin.pl

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Use of this source code is governed by a BSD-style
4
4
# license that can be found in the LICENSE file.
5
5
#
6
 
# Generate system call table for Darwin from master list
7
 
# (for example, xnu-1228/bsd/kern/syscalls.master).
 
6
# Generate system call table for Darwin from sys/syscall.h
 
7
 
 
8
use strict;
8
9
 
9
10
my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
10
11
 
18
19
EOF
19
20
 
20
21
while(<>){
21
 
        if(/^([0-9]+)\s+ALL\s+({ \S+\s+(\w+).*})/){
22
 
                my $num = $1;
23
 
                my $proto = $2;
24
 
                my $name = "SYS_$3";
 
22
        if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
 
23
                my $name = $1;
 
24
                my $num = $2;
25
25
                $name =~ y/a-z/A-Z/;
26
 
 
27
 
                # There are multiple entries for enosys and nosys, so comment them out.
28
 
                if($name =~ /^SYS_E?NOSYS$/){
29
 
                        $name = "// $name";
30
 
                }
31
 
 
32
 
                print " $name = $num;  // $proto\n";
 
26
                print " SYS_$name = $num;"
33
27
        }
34
28
}
35
29