Thread (47 messages) flat view 47 messages, 12 authors, 2016-06-15

Re: jn/svn-fe

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:49:18

Jonathan Nieder [off-list ref] writes:
quoted hunk ↗ jump to hunk
How about something like this instead?

-- 8< --
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 <redacted>
Cc: Ramkumar Ramachandra <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
 Makefile              |    8 ++
 compat/strtok_r.c     |   61 ++++++++++++++++
 git-compat-util.h     |    5 ++
 t/t9010-svn-fe.sh     |    4 +-
 vcs-svn/fast_export.c |    4 +-
 vcs-svn/repo_tree.c   |  188 ++++++++++++++++++++++++------------------------
 6 files changed, 172 insertions(+), 98 deletions(-)
 create mode 100644 compat/strtok_r.c
diff --git a/Makefile b/Makefile
index c441414..444a0fe 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,8 @@ all::
 #
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
+# Define NO_STRTOK_R if you don't have strtok_r in the C library.
+#
 # Define NO_LIBGEN_H if you don't have libgen.h.
 #
 # Define NEEDS_LIBGEN if your libgen needs -lgen when linking
You are missing autodetection by autoconf, i.e. changes to
config.mak.in and to configure.ac

  #
  # Define NO_STRTOK_R if you don't have strtok_r in the C library.
  GIT_CHECK_FUNC(strtok_r,
  [NO_STRTOK_R=],
  [NO_STRTOK_R=YesPlease])
  AC_SUBST(NO_STRTOK_R)

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help