From 0d0e1e85aad517e46bcb341cd7081395de9c6dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sun, 28 Jul 2019 13:07:22 -0700 Subject: xdiff: drop system includes in xutils.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After b46054b374 ("xdiff: use git-compat-util", 2019-04-11), two system headers added with 6942efcfa9 ("xdiff: load full words in the inner loop of xdl_hash_record", 2012-04-06) to xutils.c are no longer needed and could conflict as shown below from an OpenIndiana build: In file included from xdiff/xinclude.h:26:0, from xdiff/xutils.c:25: ./git-compat-util.h:4:0: warning: "_FILE_OFFSET_BITS" redefined #define _FILE_OFFSET_BITS 64 In file included from /usr/include/limits.h:37:0, from xdiff/xutils.c:23: /usr/include/sys/feature_tests.h:231:0: note: this is the location of the previous definition #define _FILE_OFFSET_BITS 32 Make sure git-compat-util.h is the first header (through xinclude.h) Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- xdiff/xutils.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'xdiff') diff --git a/xdiff/xutils.c b/xdiff/xutils.c index 963e1c58b9..cfa6e2220f 100644 --- a/xdiff/xutils.c +++ b/xdiff/xutils.c @@ -20,13 +20,9 @@ * */ -#include -#include #include "xinclude.h" - - long xdl_bogosqrt(long n) { long i; -- cgit v1.2.3 From 29a0f9038eb050fac4b4d284c4852b82d4d401d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sun, 28 Jul 2019 13:07:23 -0700 Subject: xdiff: remove duplicate headers from xhistogram.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8c912eea94 ("teach --histogram to diff", 2011-07-12) included them, but were already part of xinclude.h Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- xdiff/xhistogram.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'xdiff') diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index ec85f5992b..c7b35a9667 100644 --- a/xdiff/xhistogram.c +++ b/xdiff/xhistogram.c @@ -42,8 +42,6 @@ */ #include "xinclude.h" -#include "xtypes.h" -#include "xdiff.h" #define MAX_PTR UINT_MAX #define MAX_CNT UINT_MAX -- cgit v1.2.3 From 81ed2b405cc6eca56fa4ab8eb1fb3efb839e353c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sun, 28 Jul 2019 13:07:24 -0700 Subject: xdiff: remove duplicate headers from xpatience.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 92b7de93fb (Implement the patience diff algorithm, 2009-01-07) added them but were already part of xinclude.h Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- xdiff/xpatience.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'xdiff') diff --git a/xdiff/xpatience.c b/xdiff/xpatience.c index f3573d9f00..3c5601b602 100644 --- a/xdiff/xpatience.c +++ b/xdiff/xpatience.c @@ -20,8 +20,6 @@ * */ #include "xinclude.h" -#include "xtypes.h" -#include "xdiff.h" /* * The basic idea of patience diff is to find lines that are unique in -- cgit v1.2.3