develooper Front page | perl.perl5.porters | Postings from April 2003

[perl #21832] 5.8.0 - no _PATH_INFO in Sys::Syslog on Solaris and Irix

April 4, 2003 12:28
[perl #21832] 5.8.0 - no _PATH_INFO in Sys::Syslog on Solaris and Irix
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #21832]
# in the subject line of all future correspondence about this issue. 
# <URL: >

To: Subject: 
Message-Id: <>

This is a bug report for perl from,
generated with the help of perlbug 1.34 running under perl v5.8.0.

[Please enter your report here]
I also ran into this problem using Log::Log4perl, which in turn uses
Log::Dispatch, which in turn uses Sys::Syslog.

I was running into problems with Sys::Syslog::setlogsock not being able to
send a message to the syslog daemon.

On Solaris, it seems that the macro _PATH_LOG() is not defined in sys/syslog.h.

I found the following thread on Perlmonks from 2001. Can we please get fixed to take into account the fact that Solaris and IRIX
do not have this macro defined in /usr/include/sys/syslog.h.

Instead, per the solution from the thread it should use LOG_SYSLOG().

This is still occurring in 2003 with Perl 5.8.0 on Solaris 2.8 for sparc.



>> Problems with Sys::Syslog::setlogsock on Solaris 2.6
> by coreolyn on Feb 02, 2001 at 23:36 UTC
> I've run into a problem with executing the following on a Solaris 2.6 box
> with a source build of 5.6.0
>    Sys::Syslog::setlogsock("unix")
> I recieve back
> Usage: Sys::Syslog::_PATH_LOG() at
> +/home/perl/5.6.0/lib/5.6.0/sun4-solaris/Sys/ line 277
> Line 277 of is
> my $syslog = &_PATH_LOG || croak "_PATH_LOG not found in";
> Looking in the I verify that _PATH_LOG indeed is NOT listed there.
> Tracing back to /usr/include/syslog.h and sys/syslog.h I find no reference
> there either.
> Any Suggestions?
> coreolyn

And the solution:

> by coreolyn on Feb 02, 2001 at 21:07
> Seems Solaris 2.6 doesn't provide _PATH_INFO reference.
> coreolyn

> by coreolyn on Feb 02, 2001 at 21:32
> Got it! On Solaris 2.6 you need to change the value to &LOG_SYSLOG

> by Anonymous Monk on Nov 19, 2002 at 15:25
> Yep that was it for IRIX 6.5.13 also. change the value to &LOG_SYSLOG

[Please do not change anything below this line]
Site configuration information for perl v5.8.0:

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
    osname=solaris, osvers=2.8, archname=sun4-solaris
    uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 '
    config_args='-Dcc=gcc -B/usr/ccs/bin/'

--------------------------------------------- Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About