[PATCH v2 jn/svn-fe 0/5] vcs-svn: Port to Windows
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 13, 2010, 23:47 UTC
- Message-ID
- <20100813234723.GC2153@burratino>
- In-Reply-To
- <4C65BA46.9010604@kdbg.org>
Johannes Sixt wrote:
> Am 13.08.2010 02:08, schrieb Jonathan Nieder:
Show 21 quoted lines
>> Subject: vcs-svn: Port to Windows >> >> MSys #define-s dirent away. Avoid trouble by avoiding that >> identifier. >> >> Windows does not have strtok_r (and while does have an identical >> strtok_s, but it is not obvious how to use it). Grab an >> implementation from glibc. >> >> The svn-fe test fails in the “svn export” step because of the >> lack of symlink support. With a less ambitious dump, it passes. >> >> Cc: Johannes Sixt <j6t@kdbg.org> >> Cc: Ramkumar Ramachandra <artagnon@gmail.com> >> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> > > Thanks, it compiles with this patch and passes the test suite. > > Acked-by: Johannes Sixt <j6t@kdbg.org> > > The license, LGPL 2.1 or later is OK, I assume?
xdiff uses it, so I think that should be fine. If not, it shouldn’t be hard to rewrite based on the man page; I only took the glibc version because it was easy to do.
Here’s a split-up patch. Patch 1 adds an autoconf test (thanks, Jakub!). Patch 2 is a little (though not much) shorter than the blind search-and-replace I sent before. This uses uint32_t instead of int in patch 3 because the vcs-svn lib uses 32-bit lengths elsewhere.
Not tested on Windows but it is not so different from v1 which was.
Thanks again for the help.
Jonathan Nieder (5): compat: add strtok_r() vcs-svn: Rename dirent pool to build on Windows vcs-svn: Avoid %z in format string t9010 (svn-fe): use Unix-style path in URI t9010 (svn-fe): avoid symlinks in test
Makefile | 8 +++ compat/strtok_r.c | 61 ++++++++++++++++++++ config.mak.in | 1 + configure.ac | 6 ++ git-compat-util.h | 5 ++ t/t9010-svn-fe.sh | 4 +- vcs-svn/fast_export.c | 5 +- vcs-svn/repo_tree.c | 146 ++++++++++++++++++++++++------------------------ 8 files changed, 159 insertions(+), 77 deletions(-) create mode 100644 compat/strtok_r.c
-- 1.7.2.1.544.ga752d.dirty