Skip to content

Commit 83ff1da

Browse files
Ramsay Jonesgitster
authored andcommitted
cygwin: Remove the CYGWIN_V15_WIN32API build variable
Commit 380a4d9 ("Update cygwin.c for new mingw-64 win32 api headers", 11-11-2012) solved an header include order problem on cygwin 1.7 when using the new mingw-64 WIN32 API headers. The solution involved using a new build variable (V15_MINGW_HEADERS) to conditionally compile the cygwin.c source file to use an include order appropriate for the old and new header files. (The build variable was later renamed in commit 9fca6cf to CYGWIN_V15_WIN32API). The include order used for cygwin 1.7 includes the "win32.h" header before "../git-compat-util.h". This order was problematic on cygwin 1.5, since it lead to the WIN32 symbol being defined along with the inclusion of some WIN32 API headers (e.g. <winsock2.h>) which cause compilation errors. The header include order problem on cygwin 1.5 has since been fixed (see commit "mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE"), so we can now remove the conditional compilation along with the associated CYGWIN_V15_WIN32API build variable. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 380395d commit 83ff1da

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,6 @@ all::
290290
#
291291
# Define NO_REGEX if you have no or inferior regex support in your C library.
292292
#
293-
# Define CYGWIN_V15_WIN32API if you are using Cygwin v1.7.x but are not
294-
# using the current w32api packages. The recommended approach, however,
295-
# is to update your installation if compilation errors occur.
296-
#
297293
# Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the
298294
# user.
299295
#
@@ -1449,9 +1445,6 @@ ifdef NO_REGEX
14491445
COMPAT_CFLAGS += -Icompat/regex
14501446
COMPAT_OBJS += compat/regex/regex.o
14511447
endif
1452-
ifdef CYGWIN_V15_WIN32API
1453-
COMPAT_CFLAGS += -DCYGWIN_V15_WIN32API
1454-
endif
14551448

14561449
ifdef USE_NED_ALLOCATOR
14571450
COMPAT_CFLAGS += -Icompat/nedmalloc

compat/cygwin.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
#define CYGWIN_C
22
#define WIN32_LEAN_AND_MEAN
3-
#ifdef CYGWIN_V15_WIN32API
4-
#include "../git-compat-util.h"
5-
#include "win32.h"
6-
#else
73
#include <sys/stat.h>
84
#include <sys/errno.h>
95
#include "win32.h"
106
#include "../git-compat-util.h"
11-
#endif
127
#include "../cache.h" /* to read configuration */
138

149
/*

config.mak.uname

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ ifeq ($(uname_O),Cygwin)
158158
NO_SYMLINK_HEAD = YesPlease
159159
NO_IPV6 = YesPlease
160160
OLD_ICONV = UnfortunatelyYes
161-
CYGWIN_V15_WIN32API = YesPlease
162161
endif
163162
NO_THREAD_SAFE_PREAD = YesPlease
164163
NEEDS_LIBICONV = YesPlease

0 commit comments

Comments
 (0)