threads / patch / 32133

patchRename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

Subject: [PATCH] Rename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

## tl;dr

4 messages between Nov 17, 2012 and Nov 18, 2012. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Torsten Bögershausen· Nov 17, 2012, 07:09 UTC · lore

See commit 380a4d927bff693c42fc6b22c3547bdcaac4bdc3: "Update cygwin.c for new mingw-64 win32 api headers" Cygwin up to 1.7.16 uses some header file from the WINE project Cygwin 1.7.17 uses some header file from the mingw-64 project As the old cygwin (like 1.5) never used mingw, the name V15_MINGW_HEADERS is confusing. Rename it into CYGWIN_OLD_WINSOCK_HEADERS

Addtional note: Cygwin versions 1.7.1 up to 1.7.16 are expected to upgrade to Cygwin 1.7.17 or higher As a temporary workaround make can be run as CYGWIN_OLD_WINSOCK_HEADERS=Yes make

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 Makefile        | 6 +++---
 compat/cygwin.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 2 files +4 −4

Makefile, compat/cygwin.c

diff --git a/Makefile b/Makefile
index c3edf8c..c2ea735 100644
--- a/Makefile
+++ b/Makefile
@@ -1089,7 +1089,7 @@ ifeq ($(uname_O),Cygwin)
 		NO_SYMLINK_HEAD = YesPlease
 		NO_IPV6 = YesPlease
 		OLD_ICONV = UnfortunatelyYes
-		V15_MINGW_HEADERS = YesPlease
+		CYGWIN_OLD_WINSOCK_HEADERS = YesPlease
 	endif
 	NO_THREAD_SAFE_PREAD = YesPlease
 	NEEDS_LIBICONV = YesPlease
@@ -1901,8 +1901,8 @@ ifdef NO_REGEX
 	COMPAT_CFLAGS += -Icompat/regex
 	COMPAT_OBJS += compat/regex/regex.o
 endif
-ifdef V15_MINGW_HEADERS
-	COMPAT_CFLAGS += -DV15_MINGW_HEADERS
+ifdef CYGWIN_OLD_WINSOCK_HEADERS
+	COMPAT_CFLAGS += -DCYGWIN_OLD_WINSOCK_HEADERS
 endif
 
 ifdef USE_NED_ALLOCATOR
diff --git a/compat/cygwin.c b/compat/cygwin.c
index 59d86e4..b9f2862 100644
--- a/compat/cygwin.c
+++ b/compat/cygwin.c
@@ -1,5 +1,5 @@
 #define WIN32_LEAN_AND_MEAN
-#ifdef V15_MINGW_HEADERS
+#ifdef CYGWIN_OLD_WINSOCK_HEADERS
 #include "../git-compat-util.h"
 #include "win32.h"
 #else
-- 
1.7.12
Mark Levedahl· Nov 17, 2012, 14:38 UTC · re: Torsten Bögershausen · lore

Re: [PATCH] Rename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

On 11/17/2012 02:09 AM, Torsten Bögershausen wrote:
Show 20 quoted lines
> See commit 380a4d927bff693c42fc6b22c3547bdcaac4bdc3:
> "Update cygwin.c for new mingw-64 win32 api headers"
> Cygwin up to 1.7.16 uses some header file from the WINE project
> Cygwin 1.7.17 uses some header file from the mingw-64 project
> As the old cygwin (like 1.5) never used mingw,
> the name V15_MINGW_HEADERS is confusing.
> Rename it into CYGWIN_OLD_WINSOCK_HEADERS
>
>
> diff --git a/Makefile b/Makefile
> index c3edf8c..c2ea735 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1089,7 +1089,7 @@ ifeq ($(uname_O),Cygwin)
>   		NO_SYMLINK_HEAD = YesPlease
>   		NO_IPV6 = YesPlease
>   		OLD_ICONV = UnfortunatelyYes
> -		V15_MINGW_HEADERS = YesPlease
> +		CYGWIN_OLD_WINSOCK_HEADERS = YesPlease
>   

WINSOCK is certainly a part of the win32 api implementation, but it is is the entire win32api that changed, not just the tiny bit dealing with sockets. Basically, WINDOWS.h, and everything it includes, and all of the dlls it touches, and the .o files, changed. Calling it "OLD" is not helpful, what happens in the future with the next change? The only version info we really have is the dll version. We are switching between the win32 api implementation shipped with cygwin dll version 1.5.x and the one that is now current. And, the shift is not tied to any particular cygwin 1.7.x dll version either (there are no cross dependencies between the win32api implementation and any particular dll in the 1.7.x series, just a coincidence in time as to what packages got updated when). So my suggestion in the bike shedding category is to

s/V15_MINGW_HEADERS/CYGWIN_V15_WIN32API/
/end of bike shedding.
If this is really worth a second patch, I'll be happy to send one :^)
Mark
Junio C Hamano· Nov 18, 2012, 07:46 UTC · re: Mark Levedahl · lore

Re: [PATCH] Rename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

Mark Levedahl <mlevedahl@gmail.com> writes:
Show 13 quoted lines
>> ...
>> -		V15_MINGW_HEADERS = YesPlease
>> +		CYGWIN_OLD_WINSOCK_HEADERS = YesPlease
>>   
> WINSOCK is certainly a part of the win32 api implementation, but it is
> is the entire win32api that changed, not just the tiny bit dealing
> with sockets.
> Basically, WINDOWS.h, and everything it includes, and all of the dlls
> it touches, and the .o files, changed.
> ... So my suggestion in the bike shedding
> category is to
>
> s/V15_MINGW_HEADERS/CYGWIN_V15_WIN32API/
Sounds sensible.
Mark Levedahl· Nov 18, 2012, 21:16 UTC · re: Junio C Hamano · lore

[PATCH] USE CGYWIN_V15_WIN32API as macro to select api for cygwin

The previous macro was confusing to some, and did not include "cygwin" in its name. The updated name more clearly expresses a choice of the win32api implementation that shipped with version 1.5 of cygwin.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 Makefile        | 6 +++---
 compat/cygwin.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 2 files +4 −4

Makefile, compat/cygwin.c

diff --git a/Makefile b/Makefile
index cf0ecde..9731c85 100644
--- a/Makefile
+++ b/Makefile
@@ -1091,7 +1091,7 @@ ifeq ($(uname_O),Cygwin)
 		NO_SYMLINK_HEAD = YesPlease
 		NO_IPV6 = YesPlease
 		OLD_ICONV = UnfortunatelyYes
-		V15_MINGW_HEADERS = YesPlease
+		CYGWIN_V15_WIN32API = YesPlease
 	endif
 	NO_THREAD_SAFE_PREAD = YesPlease
 	NEEDS_LIBICONV = YesPlease
@@ -1906,8 +1906,8 @@ ifdef NO_REGEX
 	COMPAT_CFLAGS += -Icompat/regex
 	COMPAT_OBJS += compat/regex/regex.o
 endif
-ifdef V15_MINGW_HEADERS
-	COMPAT_CFLAGS += -DV15_MINGW_HEADERS
+ifdef CYGWIN_V15_WIN32API
+	COMPAT_CFLAGS += -DCYGWIN_V15_WIN32API
 endif
 
 ifdef USE_NED_ALLOCATOR
diff --git a/compat/cygwin.c b/compat/cygwin.c
index 59d86e4..5428858 100644
--- a/compat/cygwin.c
+++ b/compat/cygwin.c
@@ -1,5 +1,5 @@
 #define WIN32_LEAN_AND_MEAN
-#ifdef V15_MINGW_HEADERS
+#ifdef CYGWIN_V15_WIN32API
 #include "../git-compat-util.h"
 #include "win32.h"
 #else
-- 
1.8.0.0.0.14

← back to recent threads