xdiff: fix builds on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 04 Mar 2018 15:16:42 -0500
changeset 36723 1f9bbd1d6b8a
parent 36722 6bacb2f663cb
child 36724 ca201470abb4
xdiff: fix builds on Windows This works on my ancient Fedora system too, without warnings. There are, however, warnings about various 64 to 32 bit conversions on Windows that need to be examined.
mercurial/thirdparty/xdiff/xdiffi.c
mercurial/thirdparty/xdiff/xinclude.h
--- a/mercurial/thirdparty/xdiff/xdiffi.c	Mon Mar 05 01:08:40 2018 +0530
+++ b/mercurial/thirdparty/xdiff/xdiffi.c	Sun Mar 04 15:16:42 2018 -0500
@@ -30,6 +30,10 @@
 #define XDL_SNAKE_CNT 20
 #define XDL_K_HEUR 4
 
+/* VC 2008 doesn't know about the inline keyword. */
+#if defined(_MSC_VER)
+#define inline __forceinline
+#endif
 
 
 typedef struct s_xdpsplit {
--- a/mercurial/thirdparty/xdiff/xinclude.h	Mon Mar 05 01:08:40 2018 +0530
+++ b/mercurial/thirdparty/xdiff/xinclude.h	Sun Mar 04 15:16:42 2018 -0500
@@ -26,7 +26,6 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <limits.h>