[syslog-ng] HAVE_GETUTENT not defined

Balazs Scheidler bazsi at balabit.hu
Tue Jan 30 18:30:23 CET 2007


On Mon, 2007-01-29 at 21:15 +0000, Bryan Henderson wrote:
> >>> BTW, I recommend not using a standard function name for a local function.
> >>> E.g. in this case, the local version of getutent is called getutent.  That
> >>> misled me for a while, because I assumed syslog-ng was actually calling
> >>> standard getutent.  It would be better for it to call syslogng_getutent()
> >>> and have that call the real getutent() if it's available.
> >
> >I don't want to add #ifdefs to the calling side of things. I know I
> >could use macros, but then the calling side would not indicate that
> >there's a private function implemented.
> 
> I'm with you on that, but I was suggesting something different.  There
> is today an #ifdef in utils.c like this:
[snip]
> Or put the #ifdef inside my_getutent() or make my_getutent a macro.
> 
> In any case, it eliminates more confusion and with less clutter than a
> comment saying "this getutent might not be the one you're thinking
> of".
> 

But how would the calling site look like?

-- 
Bazsi



More information about the syslog-ng mailing list