Mark Levedahl wrote: > On 01/11/2013 03:17 PM, Alex Riesen wrote: >> On Fri, Jan 11, 2013 at 9:08 PM, Alex Riesen <raa.lkml@xxxxxxxxx> wrote: >>> This short discussion on GitHub (file git-compat-util.h) might be relevant: >>> >>> https://github.com/msysgit/git/commit/435bdf8c7ffa493f8f6f2e8f329f8cc22db16ce6#commitcomment-2407194 >>> >>> The change suggested there (to remove an inclusion of windows.h in >>> git-compat-util.h) might simplify the solution a little. Might even >>> remove the need for auto-configuration in Makefile (worked for me). >> Just to be clear, the change is this: >> >> diff --git a/git-compat-util.h b/git-compat-util.h >> index 4a1979f..780a919 100644 >> --- a/git-compat-util.h >> +++ b/git-compat-util.h >> @@ -85,12 +85,6 @@ >> #define _NETBSD_SOURCE 1 >> #define _SGI_SOURCE 1 >> >> -#ifdef WIN32 /* Both MinGW and MSVC */ >> -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ >> -#include <winsock2.h> >> -#include <windows.h> >> -#endif >> - >> #include <unistd.h> >> #include <stdio.h> >> #include <sys/stat.h> >> > That change alone seems fine, no apparent change building on current > cygwin. However, with that change the build still fails if > CYGWIN_V15_WIN32API is defined, so unless someone can show the > compilation works on cygwin1.5 WITHOUT defining CYGWIN_V15_WIN32API this > change does not help. I do not have an older installation available, so > cannot test. Frankly, assuming you can compile with that macro defined, > I would suggest leaving well enough alone - an unsupported configuration > is unsupported :^) I haven't been following this thread too closely, so I may have misunderstood what you would like to test but, since I use cygwin 1.5, I tried the patch given below. I only had time to compile test this patch (ie I have *not* run any of the tests - it takes over 3 hours for me), but it seems to work to that extent. (I also tried a few simple commands: status, diff, branch; seems to work OK.) If you would like me to test something else, just let me know. HTH ATB, Ramsay Jones -- >8 -- diff --git a/Makefile b/Makefile index 1b30d7b..1c84f68 100644 --- a/Makefile +++ b/Makefile @@ -281,10 +281,6 @@ all:: # # Define NO_REGEX if you have no or inferior regex support in your C library. # -# Define CYGWIN_V15_WIN32API if you are using Cygwin v1.7.x but are not -# using the current w32api packages. The recommended approach, however, -# is to update your installation if compilation errors occur. -# # Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the # user. # @@ -1402,9 +1398,6 @@ ifdef NO_REGEX COMPAT_CFLAGS += -Icompat/regex COMPAT_OBJS += compat/regex/regex.o endif -ifdef CYGWIN_V15_WIN32API - COMPAT_CFLAGS += -DCYGWIN_V15_WIN32API -endif ifdef USE_NED_ALLOCATOR COMPAT_CFLAGS += -Icompat/nedmalloc diff --git a/compat/cygwin.c b/compat/cygwin.c index 5428858..0a9aa6d 100644 --- a/compat/cygwin.c +++ b/compat/cygwin.c @@ -1,13 +1,8 @@ #define WIN32_LEAN_AND_MEAN -#ifdef CYGWIN_V15_WIN32API -#include "../git-compat-util.h" -#include "win32.h" -#else #include <sys/stat.h> #include <sys/errno.h> #include "win32.h" #include "../git-compat-util.h" -#endif #include "../cache.h" /* to read configuration */ static inline void filetime_to_timespec(const FILETIME *ft, struct timespec *ts) diff --git a/config.mak.uname b/config.mak.uname index bea34f0..5e493c9 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -158,7 +158,6 @@ ifeq ($(uname_O),Cygwin) NO_SYMLINK_HEAD = YesPlease NO_IPV6 = YesPlease OLD_ICONV = UnfortunatelyYes - CYGWIN_V15_WIN32API = YesPlease endif NO_THREAD_SAFE_PREAD = YesPlease NEEDS_LIBICONV = YesPlease diff --git a/git-compat-util.h b/git-compat-util.h index e5a4b74..3186e55 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -85,12 +85,6 @@ #define _NETBSD_SOURCE 1 #define _SGI_SOURCE 1 -#ifdef WIN32 /* Both MinGW and MSVC */ -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ -#include <winsock2.h> -#include <windows.h> -#endif - #include <unistd.h> #include <stdio.h> #include <sys/stat.h> -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html