Patchwork [1,of,3] xdiff: backport int64_t and uint64_t types to Windows

login
register
mail settings
Submitter Matt Harbison
Date March 10, 2018, 3:07 a.m.
Message ID <d3b978ff5c3fc50b33b3.1520651221@Envy>
Download mbox | patch
Permalink /patch/29232/
State Accepted
Headers show

Comments

Matt Harbison - March 10, 2018, 3:07 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1520649117 18000
#      Fri Mar 09 21:31:57 2018 -0500
# Node ID d3b978ff5c3fc50b33b3ca8f6c371df23d46404b
# Parent  9ddc9aa26801bac571bd3413a8aed900c2d2efb8
xdiff: backport int64_t and uint64_t types to Windows

Sadly, MSVC 2008 lacks stdint.h.  These are the only two definitions needed
right now.

Patch

diff --git a/mercurial/thirdparty/xdiff/xinclude.h b/mercurial/thirdparty/xdiff/xinclude.h
--- a/mercurial/thirdparty/xdiff/xinclude.h
+++ b/mercurial/thirdparty/xdiff/xinclude.h
@@ -24,7 +24,13 @@ 
 #define XINCLUDE_H
 
 #include <ctype.h>
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
 #include <stdint.h>
+#else
+/* prior to Visual Studio 2010 */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>