Mercurial > hg-stable
diff mercurial/mpatch.c @ 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 | 345107e167a0 |
children | 860e9c83fc59 |
line wrap: on
line diff
--- 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.";