summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-03-31 12:29:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-01 18:05:54 (GMT)
commitfd94836923708581ca3f9b5c42a6d600c2f631dc (patch)
tree7936c21440f1e4da339e5a708bc9dae7a95e1bf2 /run-command.h
parentbf637803a799451e7feb596422932dd60f0384e1 (diff)
downloadgit-fd94836923708581ca3f9b5c42a6d600c2f631dc.zip
git-fd94836923708581ca3f9b5c42a6d600c2f631dc.tar.gz
git-fd94836923708581ca3f9b5c42a6d600c2f631dc.tar.bz2
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>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.h b/run-command.h
index 15e870a..e345502 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;