Show More
@@ -12,10 +12,8 b'' | |||||
12 | #include <Python.h> |
|
12 | #include <Python.h> | |
13 | #include <stdlib.h> |
|
13 | #include <stdlib.h> | |
14 | #include <string.h> |
|
14 | #include <string.h> | |
|
15 | #include <stdint.h> | |||
15 | #ifdef _WIN32 |
|
16 | #ifdef _WIN32 | |
16 |
|
||||
17 | typedef unsigned long uint32_t; |
|
|||
18 |
|
||||
19 | static uint32_t htonl(uint32_t x) |
|
17 | static uint32_t htonl(uint32_t x) | |
20 | { |
|
18 | { | |
21 | return ((x & 0x000000ffUL) << 24) | |
|
19 | return ((x & 0x000000ffUL) << 24) | | |
@@ -23,11 +21,8 b' static uint32_t htonl(uint32_t x)' | |||||
23 | ((x & 0x00ff0000UL) >> 8) | |
|
21 | ((x & 0x00ff0000UL) >> 8) | | |
24 | ((x & 0xff000000UL) >> 24); |
|
22 | ((x & 0xff000000UL) >> 24); | |
25 | } |
|
23 | } | |
26 |
|
||||
27 | #else |
|
24 | #else | |
28 |
|
|
25 | #include <netinet/in.h> | |
29 | #include <sys/types.h> |
|
|||
30 | #include <stdint.h> |
|
|||
31 | #endif |
|
26 | #endif | |
32 |
|
27 | |||
33 | struct line { |
|
28 | struct line { |
@@ -23,10 +23,8 b'' | |||||
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 <stdint.h> | |||
26 | #ifdef _WIN32 |
|
27 | #ifdef _WIN32 | |
27 |
|
||||
28 | typedef unsigned long uint32_t; |
|
|||
29 |
|
||||
30 | static uint32_t ntohl(uint32_t x) |
|
28 | static uint32_t ntohl(uint32_t x) | |
31 | { |
|
29 | { | |
32 | return ((x & 0x000000ffUL) << 24) | |
|
30 | return ((x & 0x000000ffUL) << 24) | | |
@@ -34,11 +32,8 b' static uint32_t ntohl(uint32_t x)' | |||||
34 | ((x & 0x00ff0000UL) >> 8) | |
|
32 | ((x & 0x00ff0000UL) >> 8) | | |
35 | ((x & 0xff000000UL) >> 24); |
|
33 | ((x & 0xff000000UL) >> 24); | |
36 | } |
|
34 | } | |
37 |
|
||||
38 | #else |
|
35 | #else | |
39 |
|
|
36 | #include <netinet/in.h> | |
40 | #include <sys/types.h> |
|
|||
41 | #include <stdint.h> |
|
|||
42 | #endif |
|
37 | #endif | |
43 |
|
38 | |||
44 | static char mpatch_doc[] = "Efficient binary patching."; |
|
39 | static char mpatch_doc[] = "Efficient binary patching."; |
General Comments 0
You need to be logged in to leave comments.
Login now