Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/mpatch.c @ 410:7c678976df3e
Make mpatch.c compilable under the other `OS'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Make mpatch.c compilable under the other `OS'
From: K Thananchayan <thananck@yahoo.com>
manifest hash: 7b3033b761b147149fb0bcd6ff6120ccb73f16f1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCuNJCywK+sNU5EO8RAtMVAKCJxQYOa7VX4DYKDPw02ILjINiDmwCggreC
9Xw/stNxkV7zVY2IFDC14is=
=tFmZ
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Tue, 21 Jun 2005 18:51:46 -0800 |
parents | a29decbf7475 |
children | 9e9f7ab43ce2 |
comparison
equal
deleted
inserted
replaced
409:feadc9697b43 | 410:7c678976df3e |
---|---|
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; |