From: Junio C Hamano Date: Wed, 17 May 2006 17:42:48 GMT Subject: Re: [PATCH] builtin-grep: workaround for non GNU grep. Message-ID: <7vhd3ofsyv.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <4fb292fa0605170839r259732dcw1c1bae3f1808db32@mail.gmail.com> "Bertrand Jacquin" writes: > Sorry, maybe a C code beginner question but while you define > NO_H_OPTION_IN_GREP in Makefile, why don't use a build time ``if'' > instead of a runtime one ? > > Like : > > #if NO_H_OPTION_IN_GREP > push_arg("/dev/null"); > #else > push_arg("-H"); > push_arg("--"); > #fi Exactly because I wanted to avoid conditional compilation using C preprocessor directive (#if).