[comp.lang.perl] Problems with syslog

tchrist@convex.COM (Tom Christiansen) (01/17/91)

From the keyboard of heft@husc2.harvard.edu (Tom Heft):
:I'm having trouble installing a PERL script that uses
:the syslog.ph file.  The syslog.ph file includes this
:line:
:	$maskpri = &LOG_UPTO(&LOG_DEBUG);
:
:The problem is that the subroutine LOG_UPTO doesn't
:appear to be defined anywhere.  Has anyone else had
:this problem?  Am I missing something blatantly
:obvious that will make a fool out of me in front
:of the entire world? (Or, at least, the entire world
:that uses PERL, which is all that really matters :-)

I think you mean the syslog.pl file, which contains
the perl versions of syslog et amici.  The file syslog.ph
you need to create yourself from your own syslog.h
file using h2ph.  Check out the C version for how 
&LOG_UPTO should be defined (not to mention all
the other &LOG_foo things).  On my system, this is 
defined like this:

    sub LOG_UPTO {
	local($pri) = @_;
	eval "((1 << (($pri)+1)) - 1)";
    }
    sub LOG_DEBUG {7;}


The eval is there in case the C code didn't translate well.

--tom
--
"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
 he can finally have the whole O/S built-in to his editor like he
 always wanted!" --me (Tom Christiansen <tchrist@convex.com>)