0.9.1 compilation failure on Nexenta 3.0.1
Maxim Dounin
mdounin at mdounin.ru
Mon Dec 6 18:00:57 MSK 2010
Hello!
On Mon, Dec 06, 2010 at 05:36:13PM +0300, Igor Sysoev wrote:
> On Mon, Dec 06, 2010 at 09:32:07PM +0700, Edho P Arief wrote:
>
> > On Mon, Dec 6, 2010 at 9:10 PM, Igor Sysoev <igor at sysoev.ru> wrote:
> > > As I understand it uses glibc which has sys_nerr.
> > > What does
> > > grep -r sys_nerr /usr/include
> > > show ?
> > >
> >
> > I tried that yesterday, too. Also I believe it uses Solaris' libc.
> >
> > Wikipedia:
> > > Nexenta OS is the first distribution that combines the OpenSolaris C library and GNU userland with the OpenSolaris kernel.
> >
> >
> > Here's the result:
> >
> > edho at nexenta:~$ grep -r sys_nerr /usr/include
> > /usr/include/errno.h: * The symbols _sys_errlist and _sys_nerr are not
> > visible in the
> > /usr/include/iso/errno_iso.h: * The symbols _sys_errlist and _sys_nerr
> > are not visible in the
> > edho at nexenta:~$
> >
> > edho at nexenta:~$ grep -C 3 -r sys_nerr /usr/include
> > /usr/include/errno.h-
> > /usr/include/errno.h-#if defined(_LP64)
> > /usr/include/errno.h-/*
> > /usr/include/errno.h: * The symbols _sys_errlist and _sys_nerr are not
> > visible in the
> > /usr/include/errno.h- * LP64 libc. Use strerror(3C) instead.
> > /usr/include/errno.h- */
> > /usr/include/errno.h-#endif /* _LP64 */
> > --
> > /usr/include/iso/errno_iso.h-
> > /usr/include/iso/errno_iso.h-#if defined(_LP64)
> > /usr/include/iso/errno_iso.h-/*
> > /usr/include/iso/errno_iso.h: * The symbols _sys_errlist and _sys_nerr
> > are not visible in the
> > /usr/include/iso/errno_iso.h- * LP64 libc. Use strerror(3C) instead.
> > /usr/include/iso/errno_iso.h- */
> > /usr/include/iso/errno_iso.h-#endif /* _LP64 */
>
> Yes, I've just checked OpenSolaris, it has no sys_nerr.
> I will detect maximum errno using EINVAL error from strerror().
What about just not using strerror() while in signal handler (and
using normal one in other cases)? I believe we've already seen
too many problems while trying to build async-signal-safe version
of strerror().
Maxim Dounin
p.s. If for some reason you'll still prefer to continue attempts
to build async-signal-safe strerror() - please note that POSIX
doesn't require strerror() to return EINVAL for invalid codes, it
only says "may".
More information about the nginx
mailing list