{"thread":{"id":"21159","subject":"[PATCH] Fix MSVC build on cygwin","startedAt":"2009-10-08T15:21:44Z","lastAt":"2009-10-09T21:53:09Z","messageCount":5,"participants":["Ramsay Jones","Johannes Schindelin","Sverre Rabbelier","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"124392","messageId":"4ACE0388.6070706@ramsay1.demon.co.uk","threadId":"21159","inReplyTo":null,"subject":"[PATCH] Fix MSVC build on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-10-08T15:21:44Z","receivedAt":"2009-10-08T15:21:44Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn the MSVC section of the Makefile, BASIC_CFLAGS is set to a\nvalue which contains the string \"-DWIN32-D_CONSOLE\". This results\nin a (single) malformed -Define being passed to the compiler.\nAt least on my cygwin installation, the msvc compiler seems to\nignore this parameter, without issuing an error or warning, and\nresults in the WIN32 and _CONSOLE macros being undefined. This\nbreaks the build.\n\nIn order to fix the build, we simply insert a space between the\ntwo -Define parameters, \"-DWIN32\" and \"-D_CONSOLE\", as originally\nintended.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi *,\n\nThe original version of this patch used line-continuation to\nwrap the over-long lines in the MSVC section. (the lines that\nset up BASIC_CFLAGS, COMPAT_CFLAGS and BASIC_LDFLAGS.)\nHowever, that somewhat obscured the important change in this\npatch (and some people don't find line-continuation easier to\nread anyway ;-).\n\nATB,\nRamsay Jones\n\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 12defd4..ae9bb03 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -914,7 +914,7 @@ ifdef MSVC\n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n \tCFLAGS =\n-\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32-D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n+\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n \tCOMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o\n \tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -DSTRIP_EXTENSION=\\\".exe\\\"\n \tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n-- \n1.6.4\n"},{"id":"124399","messageId":"alpine.DEB.1.00.0910082040110.4985@pacific.mpi-cbg.de","threadId":"21159","inReplyTo":"4ACE0388.6070706@ramsay1.demon.co.uk","subject":"Re: [PATCH] Fix MSVC build on cygwin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-10-08T18:40:36Z","receivedAt":"2009-10-08T18:40:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Oct 2009, Ramsay Jones wrote:\n\n> Hi *,\n\nI thought we only used shell patterns for filenames, and regexes for \neverything else?\n\nCiao,\nDscho\n"},{"id":"124400","messageId":"fabb9a1e0910081150s72d3b167k841175856c1f2b6f@mail.gmail.com","threadId":"21159","inReplyTo":"alpine.DEB.1.00.0910082040110.4985@pacific.mpi-cbg.de","subject":"Re: [PATCH] Fix MSVC build on cygwin","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-10-08T18:50:16Z","receivedAt":"2009-10-08T18:50:16Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, Oct 8, 2009 at 20:40, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> I thought we only used shell patterns for filenames, and regexes for\n> everything else?\n\nMaybe he's enacting a long silence after his Hi? \"Hi                       \"?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"124428","messageId":"7v3a5t6p1f.fsf@alter.siamese.dyndns.org","threadId":"21159","inReplyTo":"4ACE0388.6070706@ramsay1.demon.co.uk","subject":"Re: [PATCH] Fix MSVC build on cygwin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-09T06:48:28Z","receivedAt":"2009-10-09T06:48:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> In the MSVC section of the Makefile, BASIC_CFLAGS is set to a\n> value which contains the string \"-DWIN32-D_CONSOLE\". This results\n> in a (single) malformed -Define being passed to the compiler.\n> At least on my cygwin installation, the msvc compiler seems to\n> ignore this parameter, without issuing an error or warning, and\n> results in the WIN32 and _CONSOLE macros being undefined. This\n> breaks the build.\n>\n> In order to fix the build, we simply insert a space between the\n> two -Define parameters, \"-DWIN32\" and \"-D_CONSOLE\", as originally\n> intended.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n\nThanks; that's quite a detailed description to explain why -DFOO-DBAR is\nbad when -DFOO -DBAR was wanted ;-)\n"},{"id":"124580","messageId":"4ACFB0C5.1040105@ramsay1.demon.co.uk","threadId":"21159","inReplyTo":"7v3a5t6p1f.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Fix MSVC build on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-10-09T21:53:09Z","receivedAt":"2009-10-09T21:53:09Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> Thanks; that's quite a detailed description to explain why -DFOO-DBAR is\n> bad when -DFOO -DBAR was wanted ;-)\n\nHeh, yeah I usually have the opposite problem; often I can't spare any\nwords past the one-line summary...\n\nI suspect the unusual verbosity won't last... ;-)\n\nATB,\nRamsay Jones\n"}]}