summary refs log tree commit diff
path: root/pkgs/stdenv/darwin/fixed-xnu-python3.patch
blob: 9f29376187f4cb0aa89fc3c6abe2d9eec2a02086 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff --git a/bsd/kern/makekdebugevents.py b/bsd/kern/makekdebugevents.py
index 73b2db4..d354ba0 100755
--- a/bsd/kern/makekdebugevents.py
+++ b/bsd/kern/makekdebugevents.py
@@ -5,7 +5,7 @@
 # named kd_events[] or these mappings.
 # Required to generate a header file used by DEVELOPMENT and DEBUG kernels.
 #
- 
+
 import sys
 import re
 
@@ -21,18 +21,18 @@ code_table = []
 # scan file to generate internal table
 with open(trace_code_file, 'rt') as codes:
     for line in codes:
-	m = id_name_pattern.match(line)
-	if m:
+        m = id_name_pattern.match(line)
+        if m:
             code_table += [(int(m.group(1),base=16), m.group(2))]
 
 # emit typedef:
-print "typedef struct {"
-print "        uint32_t   id;"
-print "        const char *name;"
-print "} kd_event_t;"
+print("typedef struct {")
+print("        uint32_t   id;")
+print("        const char *name;")
+print("} kd_event_t;")
 # emit structure declaration and sorted initialization:
-print "kd_event_t kd_events[] = {"
+print("kd_event_t kd_events[] = {")
 for mapping in sorted(code_table, key=lambda x: x[0]):
-        print "        {0x%x, \"%s\"}," % mapping
-print "};"
+        print("        {0x%x, \"%s\"}," % mapping)
+print("};")