Mercurial > hg-stable
changeset 36942:a2baa61bbb14
xdiff: move stdint.h to xdiff.h
It's more correct to put it in xdiff.h since that file actually uses int64_t
etc and xdiff.h is included by xinclude.h.
This should fix the oss-fuzz build. Thanks durin42 for discovering the
issue.
Test Plan:
`make local` and xdiff related tests still work.
Differential Revision: https://phab.mercurial-scm.org/D2848
author | Jun Wu <quark@fb.com> |
---|---|
date | Tue, 13 Mar 2018 16:56:13 -0700 |
parents | ec46b0ee2e3c |
children | cc51b6a07869 |
files | mercurial/thirdparty/xdiff/xdiff.h mercurial/thirdparty/xdiff/xinclude.h |
diffstat | 2 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/thirdparty/xdiff/xdiff.h Mon Mar 12 20:37:08 2018 +0900 +++ b/mercurial/thirdparty/xdiff/xdiff.h Tue Mar 13 16:56:13 2018 -0700 @@ -29,6 +29,14 @@ #include <stddef.h> /* size_t */ +#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 + /* xpparm_t.flags */ #define XDF_NEED_MINIMAL (1 << 0)
--- a/mercurial/thirdparty/xdiff/xinclude.h Mon Mar 12 20:37:08 2018 +0900 +++ b/mercurial/thirdparty/xdiff/xinclude.h Tue Mar 13 16:56:13 2018 -0700 @@ -24,13 +24,6 @@ #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>