PATCH: replacing exec*p with BB_EXEC*P

Bernhard Fischer rep.dot.nop at gmail.com
Sun Feb 4 11:51:21 UTC 2007


On Sun, Feb 04, 2007 at 12:03:28PM +0100, Denis Vlasenko wrote:
>On Sunday 04 February 2007 11:28, Bernhard Fischer wrote:
>> >>  #define BB_EXECVP(prog,cmd) execvp(prog,cmd)
>> >> -#define BB_EXECLP(prog,cmd,...) execvp(prog,cmd, __VA_ARGS__) 
>> >> +#define BB_EXECLP(prog,cmd,...) execlp(prog,cmd, __VA_ARGS__) 
>> >
>> >It's probably too messy to make BB_EXECLP a function because of varargs...
>> 
>> Why so? We already have several functions with varargs (our print
>> helpers), so this is fine. I'll note that several uncommon compilers had
>> problems with __VA_ARGS__ in the preprocessor but work fine for varargs
>> for the compiler. I'd prefer to have bb_execlp as a function, too.
>
>I have difficulty imagining how to _implement_ it.

>But it doesn't worth the effort/complexity.
>We have only four callsites of execlp.

I see. Well if it's only four callsite, then a define is fine.

cheers,



More information about the busybox mailing list