mac os x: fixes for 10.2 from chris monson <monpublic@gmail.com>
authorVadim Gelfer <vadim.gelfer@gmail.com>
Tue, 20 Jun 2006 17:51:39 -0700
changeset 2468 1ac0574f1768
parent 2467 4e78dc71d946
child 2469 2e91ba371c4c
child 2472 e6ec81a8feea
mac os x: fixes for 10.2 from chris monson <monpublic@gmail.com>
mercurial/bdiff.c
mercurial/mpatch.c
--- 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.";