diff --git a/mercurial/bdiff.c b/mercurial/bdiff.c --- a/mercurial/bdiff.c +++ b/mercurial/bdiff.c @@ -12,10 +12,8 @@ #include #include #include +#include #ifdef _WIN32 - -typedef unsigned long uint32_t; - static uint32_t htonl(uint32_t x) { return ((x & 0x000000ffUL) << 24) | @@ -23,11 +21,8 @@ static uint32_t htonl(uint32_t x) ((x & 0x00ff0000UL) >> 8) | ((x & 0xff000000UL) >> 24); } - #else - #include - #include - #include +#include #endif struct line { diff --git a/mercurial/mpatch.c b/mercurial/mpatch.c --- a/mercurial/mpatch.c +++ b/mercurial/mpatch.c @@ -23,10 +23,8 @@ #include #include #include +#include #ifdef _WIN32 - -typedef unsigned long uint32_t; - static uint32_t ntohl(uint32_t x) { return ((x & 0x000000ffUL) << 24) | @@ -34,11 +32,8 @@ static uint32_t ntohl(uint32_t x) ((x & 0x00ff0000UL) >> 8) | ((x & 0xff000000UL) >> 24); } - #else - #include - #include - #include +#include #endif static char mpatch_doc[] = "Efficient binary patching.";