[PATCH] bdiff/mpatch under MSVC
authormpm@selenic.com
Thu, 30 Jun 2005 23:54:17 -0800
changeset 551 b460a2fd8bb7
parent 550 96ff7dae94f7
child 553 f2442a6a5893
[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-----
mercurial/bdiff.c
mercurial/mpatch.c
--- a/mercurial/bdiff.c	Thu Jun 30 23:51:25 2005 -0800
+++ b/mercurial/bdiff.c	Thu Jun 30 23:54:17 2005 -0800
@@ -13,7 +13,12 @@
 #include <stdlib.h>
 #include <string.h>
 #ifdef _WIN32
+#ifdef _MSC_VER
+#define inline __inline
+typedef unsigned long uint32_t;
+#else
 #include <stdint.h>
+#endif
 static uint32_t htonl(uint32_t x)
 {
 	return ((x & 0x000000ffUL) << 24) |
--- a/mercurial/mpatch.c	Thu Jun 30 23:51:25 2005 -0800
+++ b/mercurial/mpatch.c	Thu Jun 30 23:54:17 2005 -0800
@@ -24,7 +24,12 @@
 #include <stdlib.h>
 #include <string.h>
 #ifdef _WIN32
+#ifdef _MSC_VER
+#define inline __inline
+typedef unsigned long uint32_t;
+#else
 #include <stdint.h>
+#endif
 static uint32_t ntohl(uint32_t x)
 {
 	return ((x & 0x000000ffUL) << 24) |