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: https://git.lorimer.id.au/gitweb.git/diff_plain/fd94836923708581ca3f9b5c42a6d600c2f631dc?ds=sidebyside 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 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;