comparison mercurial/bdiff.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 b2ae8283d1a6 934279f3ca53
comparison
equal deleted inserted replaced
471:4c7f687e4313 472:aa3d592df9b9
10 */ 10 */
11 11
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) |
22 ((x & 0x0000ff00UL) << 8) | 20 ((x & 0x0000ff00UL) << 8) |
23 ((x & 0x00ff0000UL) >> 8) | 21 ((x & 0x00ff0000UL) >> 8) |
24 ((x & 0xff000000UL) >> 24); 22 ((x & 0xff000000UL) >> 24);
25 } 23 }
26
27 #else 24 #else
28 #include <netinet/in.h> 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 {
34 int h, len, n, e; 29 int h, len, n, e;
35 const char *l; 30 const char *l;