Nicolas Williams wrote:
> There's one more option: let it use syslog(), but instead of interposing
> use a macro to force the use of the application's error handling
> function (with same prototype as syslog()).

Remember that syslog is a varargs function.  Unless you're willing to make 
assumptions about how rpcgen uses it (which, granted, aren't all that 
unreasonable; it always uses the same variation) or are willing to require 
C99, you can't override it with a macro.

With C99, yes, that seems plausible.  Much the same effect as interposing, 
except without the global effect.  The idiom should be documented so that 
people know what they can and cannot rely on.


Reply via email to