summaryrefslogtreecommitdiff
path: root/test-svn-fe.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2013-01-31 18:32:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-25 20:40:34 (GMT)
commitd0f9dbb9e29b8dc289ae3b8028586a99fdb0d194 (patch)
tree495515c22e0ed9901bd3666858d04cd94d9766d2 /test-svn-fe.c
parent93e38ed0c5a632d7b785357a309ac83e4df066fa (diff)
downloadgit-d0f9dbb9e29b8dc289ae3b8028586a99fdb0d194.zip
git-d0f9dbb9e29b8dc289ae3b8028586a99fdb0d194.tar.gz
git-d0f9dbb9e29b8dc289ae3b8028586a99fdb0d194.tar.bz2
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 <ramsay@ramsay1.demon.co.uk> Tested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-svn-fe.c')
-rw-r--r--test-svn-fe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test-svn-fe.c b/test-svn-fe.c
index 0f2d9a4..120ec96 100644
--- a/test-svn-fe.c
+++ b/test-svn-fe.c
@@ -24,7 +24,7 @@ static int apply_delta(int argc, char *argv[])
die_errno("cannot open preimage");
if (buffer_init(&delta, argv[3]))
die_errno("cannot open delta");
- if (svndiff0_apply(&delta, (off_t) strtoull(argv[4], NULL, 0),
+ if (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),
&preimage_view, stdout))
return 1;
if (buffer_deinit(&preimage))