comparison mercurial/bdiff.c @ 551:b460a2fd8bb7

[PATCH] bdiff/mpatch under MSVC -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] bdiff/mpatch under MSVC From: K Thananchayan <thananck@yahoo.com> MSVC (6.0) environment does not have 'stdint.h' and does not provide `inline' qualifier. The following patch is needed to make mecurial installable under MSVC. manifest hash: a5b64235acced16cb451faa698922559fec4e573 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxPapywK+sNU5EO8RAmRnAKCt9cOASaIsYB6kNUDSIStR1DmY4gCgnXlL Jf0nMmGEkoyXtB0eV+fLzJU= =fKD5 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Thu, 30 Jun 2005 23:54:17 -0800
parents 7f3fc8fd427e
children f2442a6a5893
comparison
equal deleted inserted replaced
550:96ff7dae94f7 551:b460a2fd8bb7
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 #ifdef _WIN32 15 #ifdef _WIN32
16 #ifdef _MSC_VER
17 #define inline __inline
18 typedef unsigned long uint32_t;
19 #else
16 #include <stdint.h> 20 #include <stdint.h>
21 #endif
17 static uint32_t htonl(uint32_t x) 22 static uint32_t htonl(uint32_t x)
18 { 23 {
19 return ((x & 0x000000ffUL) << 24) | 24 return ((x & 0x000000ffUL) << 24) |
20 ((x & 0x0000ff00UL) << 8) | 25 ((x & 0x0000ff00UL) << 8) |
21 ((x & 0x00ff0000UL) >> 8) | 26 ((x & 0x00ff0000UL) >> 8) |