From 4ab7527458a908b51891cbaa6bc0da9b711ebd19 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 31 Jan 2013 18:30:14 +0000 Subject: msvc: git-daemon: Fix linker "unresolved external" errors In particular, while linking git-daemon.exe, the linker complains that the external symbols _inet_pton and _inet_ntop are unresolved. Commit a666b472 ("daemon: opt-out on features that require posix", 04-11-2010) addressed this problem for MinGW by configuring the use of the internal 'compat' versions of these function. Although the MSVC header contains the prototypes for the inet_pton and inet_ntop functions, they are only visible for Windows API versions from 0x0600 (Windows Vista) or later. (In addition, on Windows XP, ws2_32.dll does not export these symbols). In order to fix the linker errors, we also configure the MSVC build to use the internal compat versions of these functions by setting the NO_INET_{PTON,NTOP} build variables. Signed-off-by: Ramsay Jones Tested-by: Johannes Sixt Signed-off-by: Junio C Hamano --- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config.mak.uname') diff --git a/config.mak.uname b/config.mak.uname index 8743a6d0af..911c13ec75 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -344,6 +344,8 @@ ifeq ($(uname_S),Windows) NO_CURL = YesPlease NO_PYTHON = YesPlease BLK_SHA1 = YesPlease + NO_INET_PTON = YesPlease + NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes NATIVE_CRLF = YesPlease DEFAULT_HELP_FORMAT = html -- cgit v1.2.3 From d0f9dbb9e29b8dc289ae3b8028586a99fdb0d194 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 31 Jan 2013 18:32:55 +0000 Subject: msvc: test-svn-fe: Fix linker "unresolved external" error In particular, while linking test-svn-fe.exe, the linker complains that the external symbol _strtoull is unresolved. A call to this function was added in commit ddcc8c5b ("vcs-svn: skeleton of an svn delta parser", 25-12-2010). The NO_STRTOULL build variable attempts to provide support to old systems which can't even declare 'unsigned long long' variables, let alone provide the strtoll() or strtoull() functions. Setting this build variable does not provide an implementation of these functions. Rather, it simply allows the compat implementations of strto{i,u}max() to use strtol() and strtoul() instead. In order to fix the linker error on systems with NO_STRTOULL set, currently MSVC and OSF1, we can substitute a call to strtoumax(). However, we can easily provide support for the strtoull() and strtoll() functions on MSVC, since they are essentially already available as _strtoui64() and _strtoi64(). This allows us to remove NO_STRTOULL for MSVC. Signed-off-by: Ramsay Jones Tested-by: Johannes Sixt Signed-off-by: Junio C Hamano --- config.mak.uname | 1 - 1 file changed, 1 deletion(-) (limited to 'config.mak.uname') diff --git a/config.mak.uname b/config.mak.uname index 911c13ec75..43c79e5bc2 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -327,7 +327,6 @@ ifeq ($(uname_S),Windows) # NEEDS_LIBICONV = YesPlease NO_ICONV = YesPlease NO_STRTOUMAX = YesPlease - NO_STRTOULL = YesPlease NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease SNPRINTF_RETURNS_BOGUS = YesPlease -- cgit v1.2.3 From e0492c5be123ca264a5477e3481a8a765fe9ae99 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 31 Jan 2013 18:33:57 +0000 Subject: msvc: avoid collisions between "tags" and "TAGS" Commit 2f769195 ("MinGW: avoid collisions between "tags" and "TAGS", 28-09-2010) enabled MinGW to use an ETAGS file in order to avoid filename collisions on (Windows) case insensitive filesystems. In addition, this prevents 'make' from issuing several warning messages. When using the Makefile to perform an MSVC build, which is usually executed using MinGW tools, we can also benefit from this capability. In order to reap the above benefits, we set the ETAGS_TARGET build variable to ETAGS in the MSVC config block. Signed-off-by: Ramsay Jones Tested-by: Johannes Sixt Signed-off-by: Junio C Hamano --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) (limited to 'config.mak.uname') diff --git a/config.mak.uname b/config.mak.uname index 43c79e5bc2..bb8246b63e 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -343,6 +343,7 @@ ifeq ($(uname_S),Windows) NO_CURL = YesPlease NO_PYTHON = YesPlease BLK_SHA1 = YesPlease + ETAGS_TARGET = ETAGS NO_INET_PTON = YesPlease NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes -- cgit v1.2.3