On Wed, May 18, 2016 at 02:46:16PM -0700, Evan Gates wrote: > > #ifndef __OpenBSD__ > > int pledge(const char *promises, const char *paths[]) { return 0; } > > #endif > > Why the full function instead of > > #define pledge(x,y) 0 > > (perhaps to enforce correct types?)
When using such trick you can't take function pointer. If x and y have side effects, they are not evaluated. In general preprocessor should not be used if it is easy to do the same thing without it.