Home | History | Annotate | Download | only in runtime
      1 #!/bin/bash
      2 # Copyright 2013 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 cat /Users/rsc/pub/native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h |
      7 	awk '
      8 	BEGIN {
      9 		printf("// Code generated by mknacl.sh; DO NOT EDIT.\n")
     10 	}
     11 	NF==3 && $1=="#define" && $2~/^NACL_sys_/ {
     12 		name=$2
     13 		sub(/^NACL_sys_/, "SYS_", name)
     14 		printf("#define %s %s\n", name, $3)
     15 	}' >syscall_nacl.h
     16