[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] Remarks on OpenSolaris/NexentaCore.
From: |
Mats Erik Andersson |
Subject: |
Re: [bug-inetutils] Remarks on OpenSolaris/NexentaCore. |
Date: |
Sat, 20 Aug 2011 16:02:22 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
fredag den 24 juni 2011 klockan 17:36 skrev Sergey Poznyakoff detta:
> 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.
Two passages in "src/logger.c" are now protected using
#ifdef LOG_PERROR
...
#endif
This resolved the problem.
>
> > > > 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.
Both the above matters are taken care of in the new file "src/logprio.h"
brought into "src/logger.c" and "src/syslogd.c" using
#define SYSLOG_NAMES
#include <syslog.h>
#ifndef HAVE_SYSLOG_INTERNAL
# include "logprio.h> /* Was <syslog-int.h> */
#endif
The new header file makes many macro checks in order to detect
every missing element.
> > 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.
Changed to strrschr().
The recent revisions 8cd0ff9e and 6c1d6239 contain a mixture of
small changes uncovered when attempting build on NexentaCore.
The important changes are in ftp, ping6, logger, and syslogd.
Now functional for OpenSolaris.
Regards,
Mats
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-inetutils] Remarks on OpenSolaris/NexentaCore.,
Mats Erik Andersson <=