Mats Erik Andersson <[email protected]> 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