{"thread":{"id":"33706","subject":"[PATCH v2 2/2] cygwin: Remove the CYGWIN_V15_WIN32API build variable","startedAt":"2013-05-02T19:29:04Z","lastAt":"2013-05-03T08:17:28Z","messageCount":2,"participants":["Ramsay Jones","Eric Sunshine"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"216306","messageId":"5182BE80.7060400@ramsay1.demon.co.uk","threadId":"33706","inReplyTo":null,"subject":"[PATCH v2 2/2] cygwin: Remove the CYGWIN_V15_WIN32API build variable","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-05-02T19:29:04Z","receivedAt":"2013-05-02T19:29:04Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit 380a4d92 (\"Update cygwin.c for new mingw-64 win32 api headers\",\n11-11-2012) solved an header include order problem on cygwin 1.7 when\nusing the new mingw-64 WIN32 API headers. The solution involved using\na new build variable (V15_MINGW_HEADERS) to conditionally compile the\ncygwin.c source file to use an include order appropriate for the old\nand new header files. (The build variable was later renamed in commit\n9fca6cff to CYGWIN_V15_WIN32API).\n\nThe include order used for cygwin 1.7 includes the \"win32.h\" header\nbefore \"../git-compat-util.h\". This order was problematic on cygwin\n1.5, since it lead to the WIN32 symbol being defined along with the\ninclusion of some WIN32 API headers (e.g. <winsock2.h>) which cause\ncompilation errors.\n\nThe header include order problem on cygwin 1.5 has since been fixed\n(see commit \"mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE\"),\nso we can now remove the conditional compilation along with the\nassociated CYGWIN_V15_WIN32API build variable.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n Makefile         | 7 -------\n compat/cygwin.c  | 5 -----\n config.mak.uname | 1 -\n 3 files changed, 13 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 0f931a2..32c49ba 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -290,10 +290,6 @@ all::\n #\n # Define NO_REGEX if you have no or inferior regex support in your C library.\n #\n-# Define CYGWIN_V15_WIN32API if you are using Cygwin v1.7.x but are not\n-# using the current w32api packages. The recommended approach, however,\n-# is to update your installation if compilation errors occur.\n-#\n # Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the\n # user.\n #\n@@ -1449,9 +1445,6 @@ ifdef NO_REGEX\n \tCOMPAT_CFLAGS += -Icompat/regex\n \tCOMPAT_OBJS += compat/regex/regex.o\n endif\n-ifdef CYGWIN_V15_WIN32API\n-\tCOMPAT_CFLAGS += -DCYGWIN_V15_WIN32API\n-endif\n \n ifdef USE_NED_ALLOCATOR\n        COMPAT_CFLAGS += -Icompat/nedmalloc\ndiff --git a/compat/cygwin.c b/compat/cygwin.c\nindex 871b41d..91ce5d4 100644\n--- a/compat/cygwin.c\n+++ b/compat/cygwin.c\n@@ -1,14 +1,9 @@\n #define CYGWIN_C\n #define WIN32_LEAN_AND_MEAN\n-#ifdef CYGWIN_V15_WIN32API\n-#include \"../git-compat-util.h\"\n-#include \"win32.h\"\n-#else\n #include <sys/stat.h>\n #include <sys/errno.h>\n #include \"win32.h\"\n #include \"../git-compat-util.h\"\n-#endif\n #include \"../cache.h\" /* to read configuration */\n \n /*\ndiff --git a/config.mak.uname b/config.mak.uname\nindex d78fd3d..28aa239 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -158,7 +158,6 @@ ifeq ($(uname_O),Cygwin)\n \t\tNO_SYMLINK_HEAD = YesPlease\n \t\tNO_IPV6 = YesPlease\n \t\tOLD_ICONV = UnfortunatelyYes\n-\t\tCYGWIN_V15_WIN32API = YesPlease\n \tendif\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n-- \n1.8.2\n"},{"id":"216345","messageId":"CAPig+cR3s4nzSOrG+=-MYEA4heTeMHpHQmAChWLEuFY2v+PhPA@mail.gmail.com","threadId":"33706","inReplyTo":"5182BE80.7060400@ramsay1.demon.co.uk","subject":"Re: [PATCH v2 2/2] cygwin: Remove the CYGWIN_V15_WIN32API build variable","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-05-03T08:17:28Z","receivedAt":"2013-05-03T08:17:28Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, May 2, 2013 at 3:29 PM, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:\n> Commit 380a4d92 (\"Update cygwin.c for new mingw-64 win32 api headers\",\n> 11-11-2012) solved an header include order problem on cygwin 1.7 when\n> using the new mingw-64 WIN32 API headers. The solution involved using\n> a new build variable (V15_MINGW_HEADERS) to conditionally compile the\n> cygwin.c source file to use an include order appropriate for the old\n> and new header files. (The build variable was later renamed in commit\n> 9fca6cff to CYGWIN_V15_WIN32API).\n>\n> The include order used for cygwin 1.7 includes the \"win32.h\" header\n> before \"../git-compat-util.h\". This order was problematic on cygwin\n> 1.5, since it lead to the WIN32 symbol being defined along with the\n\ns/lead/led/\n\n> inclusion of some WIN32 API headers (e.g. <winsock2.h>) which cause\n> compilation errors.\n>\n> The header include order problem on cygwin 1.5 has since been fixed\n> (see commit \"mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE\"),\n> so we can now remove the conditional compilation along with the\n> associated CYGWIN_V15_WIN32API build variable.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n"}]}