Jeff King [off-list ref] writes:
On Sat, Feb 22, 2014 at 10:29:22AM +0700, Nguyễn Thái Ngọc Duy wrote:
quoted
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
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:
quoted
--- 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:
quoted
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.
On Mon, Feb 24, 2014 at 11:39 PM, Junio C Hamano [off-list ref] wrote:
quoted
quoted
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.
Jeff, I'm still waiting if you agree to go with this syntax or put
version before refname before rerolling (either with build time option
like this, or implement the compat function myself).
--
Duy
On Tue, Feb 25, 2014 at 06:30:35AM +0700, Duy Nguyen wrote:
quoted
quoted
quoted
+[ "$(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.
Jeff, I'm still waiting if you agree to go with this syntax or put
version before refname before rerolling (either with build time option
like this, or implement the compat function myself).
Sorry. I didn't respond because I was trying to think of something to
say besides "no, I still like mine better". I admit that it's mostly a
gut feeling, and I don't have any argument beyond what I've already
made (your "it's like a typecast" does make some sense, but I think that
is a convoluted way of thinking about it).
-Peff