Re: [PATCH] MSVC: added missing include so `make INLINE=__inline` is no longer required
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 27, 2014, 16:49 UTC
- Message-ID
- <xmqqzjkbegdt.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1395905668-32005-2-git-send-email-marat@slonopotamus.org>
Marat Radchenko <marat@slonopotamus.org> writes:
Show 14 quoted lines
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org> > --- > xdiff/xutils.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xdiff/xutils.c b/xdiff/xutils.c > index 62cb23d..a21a835 100644 > --- a/xdiff/xutils.c > +++ b/xdiff/xutils.c > @@ -23,6 +23,7 @@ > #include <limits.h> > #include <assert.h> > #include "xinclude.h" > +#include "git-compat-util.h"
This is unfortunate for a few reasons:
- xdiff/* is a borrowed code; we do not want to have (or add more) dependencies on the rest of Git, including compat-util.
- When a piece of our code needs our compatibility support, compat-util must be the first header file included (either directly, or indirectly by including another header file that includes it at the top).
My gut feeling is that adding a mechanism to add -DINLINE=__inline only on MSVC to the top-level Makefile, without touching this file, may be a much more palatable.
I dunno.