##// END OF EJS Templates
Make mpatch.c compilable under the other `OS'...
mpm@selenic.com -
r410:7c678976 default
parent child Browse files
Show More
@@ -23,8 +23,21 b''
23 23 #include <Python.h>
24 24 #include <stdlib.h>
25 25 #include <string.h>
26 #include <netinet/in.h>
27 #include <sys/types.h>
26 #ifdef _WIN32
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 42 static char mpatch_doc[] = "Efficient binary patching.";
30 43
General Comments 0
You need to be logged in to leave comments. Login now