equal
deleted
inserted
replaced
21 */ |
21 */ |
22 |
22 |
23 #include <Python.h> |
23 #include <Python.h> |
24 #include <stdlib.h> |
24 #include <stdlib.h> |
25 #include <string.h> |
25 #include <string.h> |
26 #include <netinet/in.h> |
26 #ifdef _WIN32 |
27 #include <sys/types.h> |
27 |
|
28 typedef unsigned long uint32_t; |
|
29 |
|
30 uint32_t ntohl(uint32_t x) { |
|
31 return ((x & 0x000000ffUL) << 24) | |
|
32 ((x & 0x0000ff00UL) << 8) | |
|
33 ((x & 0x00ff0000UL) >> 8) | |
|
34 ((x & 0xff000000UL) >> 24); |
|
35 } |
|
36 |
|
37 #else |
|
38 #include <netinet/in.h> |
|
39 #include <sys/types.h> |
|
40 #endif |
28 |
41 |
29 static char mpatch_doc[] = "Efficient binary patching."; |
42 static char mpatch_doc[] = "Efficient binary patching."; |
30 |
43 |
31 struct frag { |
44 struct frag { |
32 int start, end, len; |
45 int start, end, len; |