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>
This commit is contained in:
Jeff King 2009-03-31 08:29:23 -04:00 committed by Junio C Hamano
parent bf637803a7
commit fd94836923

View File

@ -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;