--- a/mercurial/bdiff.c Tue Jun 20 15:23:54 2006 -0700
+++ b/mercurial/bdiff.c Tue Jun 20 17:51:39 2006 -0700
@@ -10,6 +10,7 @@
*/
#include <Python.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
--- a/mercurial/mpatch.c Tue Jun 20 15:23:54 2006 -0700
+++ b/mercurial/mpatch.c Tue Jun 20 17:51:39 2006 -0700
@@ -23,13 +23,15 @@
#include <Python.h>
#include <stdlib.h>
#include <string.h>
+
#ifdef _WIN32
-#ifdef _MSC_VER
-#define inline __inline
+# ifdef _MSC_VER
+/* msvc 6.0 has problems */
+# define inline __inline
typedef unsigned long uint32_t;
-#else
-#include <stdint.h>
-#endif
+# else
+# include <stdint.h>
+# endif
static uint32_t ntohl(uint32_t x)
{
return ((x & 0x000000ffUL) << 24) |
@@ -38,8 +40,10 @@
((x & 0xff000000UL) >> 24);
}
#else
-#include <sys/types.h>
-#include <arpa/inet.h>
+/* not windows */
+# include <sys/types.h>
+# include <arpa/inet.h>
+# include <stdint.h>
#endif
static char mpatch_doc[] = "Efficient binary patching.";