Ben Walton wrote:
> In one of the subsequent tweaks to this test, you restored a space
> between the function name and the emtpy () at the call site for
> geteuid.  I realize I let some foo() slip through so it's
> understandable that you were doing a bunch of corrections.  Will this
> not break the use of the macro for platforms lacking geteuid though?
> ...
> -  if (geteuid () != 0)
> +  /* NOTE: the missing space between function name and () is
> +     intentional here so that in the event geteuid is derived from the
> +     macro above it will still work. */
> +  if (geteuid() != 0)

You have been misunderstanding how the C and C++ macro expansion process
works. The only place where a space before the open parenthesis is not
allowed is in the *definition* of a macro with arguments, like here:

# define geteuid() ((uid_t) -1)

NOT

# define geteuid () ((uid_t) -1)

For details, please see in ISO C:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf
section 6.10.3.

Bruno
-- 
In memoriam Fred Hampton <http://en.wikipedia.org/wiki/Fred_Hampton>

Reply via email to