summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2009-03-31 08:29:23 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-04-01 11:05:54 -0700
commitfd94836923708581ca3f9b5c42a6d600c2f631dc (patch)
tree7936c21440f1e4da339e5a708bc9dae7a95e1bf2
parentmailmap: resurrect lower-casing of email addresses (diff)
downloadtgif-fd94836923708581ca3f9b5c42a6d600c2f631dc.tar.xz
fix portability problem with IS_RUN_COMMAND_ERR
Some old versions of gcc don't seem to like us negating an enum constant. Let's work around it by negating the other half of the comparison instead. Reported by Pierre Poissinger on gcc 2.9. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--run-command.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.h b/run-command.h
index 15e870a65e..e345502843 100644
--- a/run-command.h
+++ b/run-command.h
@@ -10,7 +10,7 @@ enum {
ERR_RUN_COMMAND_WAITPID_SIGNAL,
ERR_RUN_COMMAND_WAITPID_NOEXIT,
};
-#define IS_RUN_COMMAND_ERR(x) ((x) <= -ERR_RUN_COMMAND_FORK)
+#define IS_RUN_COMMAND_ERR(x) (-(x) >= ERR_RUN_COMMAND_FORK)
struct child_process {
const char **argv;