From fd94836923708581ca3f9b5c42a6d600c2f631dc Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 31 Mar 2009 08:29:23 -0400 Subject: [PATCH] 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 --- run-command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2