Skip to content

Commit

Permalink
xdiff: drop system includes in xutils.c
Browse files Browse the repository at this point in the history
After b46054b ("xdiff: use git-compat-util", 2019-04-11), two system
headers added with 6942efc ("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 <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
carenas authored and gitster committed Jul 29, 2019
1 parent 7a06fb0 commit 0d0e1e8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions xdiff/xutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@
*
*/

#include <limits.h>
#include <assert.h>
#include "xinclude.h"




long xdl_bogosqrt(long n) {
long i;

Expand Down

0 comments on commit 0d0e1e8

Please sign in to comment.