bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] Remarks on OpenSolaris/NexentaCore.


From: Sergey Poznyakoff
Subject: Re: [bug-inetutils] Remarks on OpenSolaris/NexentaCore.
Date: Fri, 24 Jun 2011 17:36:38 +0300

Mats Erik Andersson <address@hidden> ha escrit:

> In fact, LOG_PERROR is missing in POSIX.1-2001

It is indeed.  The best fix would be perhaps

#ifndef LOG_PERROR
# define LOG_PERROR 0
#endif

somewhere in the headers.

> > >    Missing CODE
> > >    Missing facilitynames
> > >    Missing prioritynames
> > 
> > Where are these used?  Can't find them in POSIX nor glibc manual.
> > Possibly they should not be used.

They should not, definitely.  We should use our own assoc tables instead.

> It is brought in as soon as SYSLOG_NAMES is not able
> to detect the presence some of 'LOG_FAC', 'prioritynames',
> and 'CODE'. All these are missing in OpenSolaris. The
> macro LOG_FAC can be copied verbatim from glibc

That's a bit of thin ice, but in general a

#define LOG_FAC(p) (((p) & 0x03f8) >> 3)

should suffice.

> Another observation: In 'libls/fts.c' there is a reference
> to 'rindex(3)'.

It's a leftover from the original BSD code.  It's much better to use
the POSIX strchr, instead.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]