aboutsummaryrefslogtreecommitdiff
path: root/script/gen-manual-mach.sh
diff options
context:
space:
mode:
authorcomex2016-07-12 20:08:53 -0400
committercomex2016-07-12 20:08:53 -0400
commit7b262dfa85aab60479be332d9437405739ec915c (patch)
tree33f78066f9a31834f64a09c99ceccb94ac7eb05f /script/gen-manual-mach.sh
parentcomment (diff)
downloadsubstitute-7b262dfa85aab60479be332d9437405739ec915c.tar.gz
replace broken gen-manual-mach.sh with a Python version
it was dropping the #pragma pack(4) declarations, rendering it broken for like most of the last year
Diffstat (limited to '')
-rwxr-xr-xscript/gen-manual-mach.sh26
1 files changed, 0 insertions, 26 deletions
diff --git a/script/gen-manual-mach.sh b/script/gen-manual-mach.sh
deleted file mode 100755
index 2676915..0000000
--- a/script/gen-manual-mach.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-out=generated/manual-mach.inc.h
-pat='/thread_[gs]et_state|vm_remap/'
-(mig -user /dev/stdout -server /dev/null -header /dev/stdout /usr/include/mach/{thread_act,mach_vm}.defs |
- egrep -v '^(#ifndef|#define|#endif).*_user_' |
- egrep -v '#include "stdout"' |
- unifdef -D__MigTypeCheck -Umig_external -UUSING_VOUCHERS |
- egrep -v 'voucher_mach_msg_set' |
- egrep -v '#define mig_external' |
- sed -E 's/(mach_msg|memcpy)\(/manual_\1(/g;
- s/^\)/, mach_port_t reply_port)/;
- s/_kernelrpc_//g;
- s/(Request|Reply)__/\1__manual_/g;
- s/[[:<:]]extern[[:>:]]/static/g;
- s/^([a-z].*)?kern_return_t[[:blank:]]+([a-z])/\1kern_return_t manual_\2/;
- s/mig_external/static/g;
- s/mig_get_reply_port\(\)/reply_port/g' |
- awk 'BEGIN { on = 1; }
- /^\/\* Routine / ||
- (/__MIG_check__Reply__/ && /^#[ie]/) { on = '"$pat"'; }
- on { print; }
- /typedef struct {/ { xon = 1; accum = ""; }
- xon { accum = accum $0 "\n"; }
- xon && /} / { if('"$pat"') print accum; xon = 0; }
- /#endif.*__AfterMigUserHeader/ { on = 1; }
- ' > $out) || rm -f $out