From: Jeff King Date: Tue, 31 Mar 2009 12:29:23 +0000 (-0400) Subject: fix portability problem with IS_RUN_COMMAND_ERR X-Git-Tag: v1.6.2.2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fd94836923708581ca3f9b5c42a6d600c2f631dc;p=git.git 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 --- diff --git a/run-command.h b/run-command.h index 15e870a65..e34550284 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;