Jeff King <peff@xxxxxxxx> writes: > On Sat, Feb 22, 2014 at 10:29:22AM +0700, Nguyễn Thái Ngọc Duy wrote: > >> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> >> --- >> The new prereq GNULINUX is an ugly workaround until people provide >> strverscmp compat implementation. I hope that will happen soon as >> strverscmp.c does not look very complex. > > Should GNULINUX be called HAVE_STRVERSCMP in the Makefile? > > Then this: > >> --- a/git-compat-util.h >> +++ b/git-compat-util.h >> @@ -721,4 +721,11 @@ void warn_on_inaccessible(const char *path); >> /* Get the passwd entry for the UID of the current process. */ >> struct passwd *xgetpwuid_self(void); >> >> +#ifndef __GNU_LIBRARY__ >> +static inline int strverscmp(const char *s1, const char *s2) >> +{ >> + die("strverscmp() not supported"); >> +} >> +#endif > > becomes "#ifndef HAVE_STRVERSCMP", and this: > >> diff --git a/t/test-lib.sh b/t/test-lib.sh >> index 1531c24..5e8c39a 100644 >> --- a/t/test-lib.sh >> +++ b/t/test-lib.sh >> @@ -771,6 +771,8 @@ case $(uname -s) in >> ;; >> esac >> >> +[ "$(uname -o)" = "GNU/Linux" ] && test_set_prereq GNULINUX >> + > > can pick up the value from GIT-BUILD-OPTIONS as a prerequisite (see the > way we handle NO_PERL for an example). Though if we can just grab the > glibc version as a fallback, we can do away with that completely. ;-) I like that. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html