diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-08-13 18:59:40 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-14 19:35:38 -0700 |
commit | 78457bc0ccc1af8b9eb776a0b17986ebd50442bc (patch) | |
tree | 4db7155097fa10d0e56656c6afeef36cd4ec5c61 /Makefile | |
parent | 6ad263ce7afc6c21c3ada1691f4772993b8ae46b (diff) | |
download | git-78457bc0ccc1af8b9eb776a0b17986ebd50442bc.tar.gz |
compat: add strtok_r()
Windows does not have strtok_r (and while it does have an identical
strtok_s, but it is not obvious how to use it). Grab an
implementation from glibc.
The svn-fe tool uses strtok_r to parse paths.
Acked-by: Johannes Sixt <j6t@kdbg.org>
Helped-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 @@ -1041,6 +1043,7 @@ ifeq ($(uname_S),Windows) NO_UNSETENV = YesPlease NO_STRCASESTR = YesPlease NO_STRLCPY = YesPlease + NO_STRTOK_R = YesPlease NO_MEMMEM = YesPlease # NEEDS_LIBICONV = YesPlease NO_ICONV = YesPlease @@ -1095,6 +1098,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_UNSETENV = YesPlease NO_STRCASESTR = YesPlease NO_STRLCPY = YesPlease + NO_STRTOK_R = YesPlease NO_MEMMEM = YesPlease NEEDS_LIBICONV = YesPlease OLD_ICONV = YesPlease @@ -1325,6 +1329,10 @@ endif ifdef NO_STRTOULL COMPAT_CFLAGS += -DNO_STRTOULL endif +ifdef NO_STRTOK_R + COMPAT_CFLAGS += -DNO_STRTOK_R + COMPAT_OBJS += compat/strtok_r.o +endif ifdef NO_SETENV COMPAT_CFLAGS += -DNO_SETENV COMPAT_OBJS += compat/setenv.o |