BVB Source Codes

goreplay Show mksysnum_darwin.pl Source code

Return Download goreplay: download mksysnum_darwin.pl Source code - Download goreplay Source code - Type:.pl
  1. #!/usr/bin/env perl
  2. # Copyright 2009 The Go Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style
  4. # license that can be found in the LICENSE file.
  5. #
  6. # Generate system call table for Darwin from sys/syscall.h
  7.  
  8. use strict;
  9.  
  10. if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
  11.         print STDERR "GOARCH or GOOS not defined in environment\n";
  12.         exit 1;
  13. }
  14.  
  15. my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
  16.  
  17. print <<EOF;
  18. // $command
  19. // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
  20.  
  21. // +build $ENV{'GOARCH'},$ENV{'GOOS'}
  22.  
  23. package unix
  24.  
  25. const (
  26. EOF
  27.  
  28. while(<>){
  29.         if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
  30.                 my $name = $1;
  31.                 my $num = $2;
  32.                 $name =~ y/a-z/A-Z/;
  33.                 print " SYS_$name = $num;"
  34.         }
  35. }
  36.  
  37. print <<EOF;
  38. )
  39. EOF
  40.  
downloadmksysnum_darwin.pl Source code - Download goreplay Source code
Related Source Codes/Software:
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10
django-rest-framework - Web APIs for Django. http:/... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10

 Back to top