[syslog-ng] HAVE_GETUTENT not defined
Bryan Henderson
bryanh at giraffe-data.com
Wed Jan 31 23:10:25 CET 2007
>>> >>> 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. ...
>>> >
>>> >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:
>>> ...
>
>But how would the calling site look like?
Today, it's:
while ((ut = getutent()))
In my scheme, it's:
while ((ut = my_getutent()))
(on a system that has standard getutent(), my_getutent() is implemented as
a call to the system's getutent()).
--
Bryan Henderson San Jose, California
More information about the syslog-ng
mailing list