Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/mpatch.c @ 472:aa3d592df9b9
extensions: use stdint.h
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
extensions: use stdint.h
Not sure why I didn't do this the first time around. Hopefully still
builds everywhere.
manifest hash: 965582286a190728f8cc0dfb8e11ee56628a59a5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCvfRgywK+sNU5EO8RAg9SAJ4/ZVpQZcDY5xovLDTZK2txEegEgwCdF2b+
lzSIP109qq8D+KIdUWsbEPc=
=+0Yy
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sat, 25 Jun 2005 16:18:40 -0800 |
parents | 50da4bb9cab6 |
children | 098d1f039c18 e94cebc60d96 |
comparison
equal
deleted
inserted
replaced
471:4c7f687e4313 | 472:aa3d592df9b9 |
---|---|
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 <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) | |
33 ((x & 0x0000ff00UL) << 8) | | 31 ((x & 0x0000ff00UL) << 8) | |
34 ((x & 0x00ff0000UL) >> 8) | | 32 ((x & 0x00ff0000UL) >> 8) | |
35 ((x & 0xff000000UL) >> 24); | 33 ((x & 0xff000000UL) >> 24); |
36 } | 34 } |
37 | |
38 #else | 35 #else |
39 #include <netinet/in.h> | 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."; |
45 | 40 |
46 struct frag { | 41 struct frag { |