Subject: Re: jn/svn-fe

From: Jakub Narebski <[email-masked]>
Date: Fri, 13 Aug 2010 03:18:23 -0700 (PDT)

Jonathan Nieder <[email-masked]> writes:

> 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 <[email-masked]>
> Cc: Ramkumar Ramachandra <[email-masked]>
> Signed-off-by: Jonathan Nieder <[email-masked]>
> ---
>  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