{"thread":{"id":"36299","subject":"[PATCH] MSVC: added missing include so `make INLINE=__inline` is no longer required","startedAt":"2014-03-27T07:34:27Z","lastAt":"2014-03-28T07:33:51Z","messageCount":5,"participants":["Marat Radchenko","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"237886","messageId":"1395905668-32005-1-git-send-email-marat@slonopotamus.org","threadId":"36299","inReplyTo":null,"subject":"[PATCH] MSVC: allow enabling CURL","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-03-27T07:34:27Z","receivedAt":"2014-03-27T07:34:27Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n compat/vcbuild/scripts/clink.pl | 2 ++\n config.mak.uname                | 1 -\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl\nindex 4374771..a87d0da 100755\n--- a/compat/vcbuild/scripts/clink.pl\n+++ b/compat/vcbuild/scripts/clink.pl\n@@ -33,6 +33,8 @@ while (@ARGV) {\n \t\tpush(@args, \"libeay32.lib\");\n \t} elsif (\"$arg\" eq \"-lssl\") {\n \t\tpush(@args, \"ssleay32.lib\");\n+\t} elsif (\"$arg\" eq \"-lcurl\") {\n+\t\tpush(@args, \"libcurl.lib\");\n \t} elsif (\"$arg\" =~ /^-L/ && \"$arg\" ne \"-LTCG\") {\n \t\t$arg =~ s/^-L/-LIBPATH:/;\n \t\tpush(@args, $arg);\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6069a44..cfc2a93 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -340,7 +340,6 @@ ifeq ($(uname_S),Windows)\n \tUNRELIABLE_FSTAT = UnfortunatelyYes\n \tOBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo\n \tNO_REGEX = YesPlease\n-\tNO_CURL = YesPlease\n \tNO_GETTEXT = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n-- \n1.9.1\n"},{"id":"237885","messageId":"1395905668-32005-2-git-send-email-marat@slonopotamus.org","threadId":"36299","inReplyTo":"1395905668-32005-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH] MSVC: added missing include so `make INLINE=__inline` is no longer required","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-03-27T07:34:28Z","receivedAt":"2014-03-27T07:34:28Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n xdiff/xutils.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/xdiff/xutils.c b/xdiff/xutils.c\nindex 62cb23d..a21a835 100644\n--- a/xdiff/xutils.c\n+++ b/xdiff/xutils.c\n@@ -23,6 +23,7 @@\n #include <limits.h>\n #include <assert.h>\n #include \"xinclude.h\"\n+#include \"git-compat-util.h\"\n \n \n \n-- \n1.9.1\n"},{"id":"237913","messageId":"xmqqzjkbegdt.fsf@gitster.dls.corp.google.com","threadId":"36299","inReplyTo":"1395905668-32005-2-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH] MSVC: added missing include so `make INLINE=__inline` is no longer required","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-27T16:49:18Z","receivedAt":"2014-03-27T16:49:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  xdiff/xutils.c | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/xdiff/xutils.c b/xdiff/xutils.c\n> index 62cb23d..a21a835 100644\n> --- a/xdiff/xutils.c\n> +++ b/xdiff/xutils.c\n> @@ -23,6 +23,7 @@\n>  #include <limits.h>\n>  #include <assert.h>\n>  #include \"xinclude.h\"\n> +#include \"git-compat-util.h\"\n\nThis is unfortunate for a few reasons:\n\n - xdiff/* is a borrowed code; we do not want to have (or add more)\n   dependencies on the rest of Git, including compat-util.\n\n - When a piece of our code needs our compatibility support,\n   compat-util must be the first header file included (either\n   directly, or indirectly by including another header file that\n   includes it at the top).\n\nMy gut feeling is that adding a mechanism to add -DINLINE=__inline\nonly on MSVC to the top-level Makefile, without touching this file,\nmay be a much more palatable.\n\nI dunno.\n"},{"id":"237919","messageId":"loom.20140327T183247-442@post.gmane.org","threadId":"36299","inReplyTo":"xmqqzjkbegdt.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] MSVC: added missing include so `makeINLINE=__inline` is no longer required","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-03-27T17:43:40Z","receivedAt":"2014-03-27T17:43:40Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Junio C Hamano <gitster <at> pobox.com> writes:\n> My gut feeling is that adding a mechanism to add -DINLINE=__inline\n> only on MSVC to the top-level Makefile, without touching this file,\n> may be a much more palatable.\n\nOkay, I'll think more about this one. Maybe *moving* inline=__inline from \ncompat-headers into Makefile (actually, config.mak.uname) will work better.\n\nHope it doesn't prevent first patch from being integrated -- joining them in a \nsingle thread was unintentional misuse of `git send-email` flags.\n"},{"id":"237987","messageId":"1395992031-27200-1-git-send-email-marat@slonopotamus.org","threadId":"36299","inReplyTo":"xmqqzjkbegdt.fsf@gitster.dls.corp.google.com","subject":"[PATCH v2] MSVC: define INLINE=__inline so simple `make MSVC=1` actually works","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-03-28T07:33:51Z","receivedAt":"2014-03-28T07:33:51Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Without this, xdiff/xutils.c fails to compile.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n\nI thought about removing #define inline __inline from compat/msvc.h but:\n\n * compat/msvc.h is included based on #if defined(_MSC_VER)\n   and can be enabled even if MSVC != 1\n * compat/msvc.h also has #define __inline__ __inline and I don't see\n   a nice way to handle both of them in config.mak.uname\n\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6c7b904..38c60af 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -355,6 +355,7 @@ ifeq ($(uname_S),Windows)\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n \tDEFAULT_HELP_FORMAT = html\n+\tINLINE = __inline\n \n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n-- \n1.9.1\n"}]}