changeset 2468:1ac0574f1768

mac os x: fixes for 10.2 from chris monson <monpublic@gmail.com>
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 20 Jun 2006 17:51:39 -0700
parents 4e78dc71d946
children 2e91ba371c4c e6ec81a8feea
files mercurial/bdiff.c mercurial/mpatch.c
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bdiff.c
+++ b/mercurial/bdiff.c
@@ -10,6 +10,7 @@
 */
 
 #include <Python.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
--- a/mercurial/mpatch.c
+++ b/mercurial/mpatch.c
@@ -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 @@ static uint32_t ntohl(uint32_t x)
 		((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.";