summaryrefslogtreecommitdiff
path: root/lib/syslog.pl
diff options
context:
space:
mode:
authorAndy Dougherty <doughera.lafayette.edu>1995-12-21 00:01:16 +0000
committerAndy Dougherty <doughera.lafayette.edu>1995-12-21 00:01:16 +0000
commitcb1a09d0194fed9b905df7b04a4bc031d354609d (patch)
treef0c890a5a8f5274873421ac573dfc719188e5eec /lib/syslog.pl
parent3712091946b37b5feabcc1f630b32639406ad717 (diff)
downloadperl-cb1a09d0194fed9b905df7b04a4bc031d354609d.tar.gz
This is patch.2b1g to perl5.002beta1.
cd to your perl source directory, and type patch -p1 -N < patch.2b1g This patch is just my packaging of Tom's documentation patches he released as patch.2b1g. Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042
Diffstat (limited to 'lib/syslog.pl')
-rw-r--r--lib/syslog.pl18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/syslog.pl b/lib/syslog.pl
index a3b9edf8da..2034e0aa48 100644
--- a/lib/syslog.pl
+++ b/lib/syslog.pl
@@ -31,8 +31,16 @@ package syslog;
$host = 'localhost' unless $host; # set $syslog'host to change
+if ($] >= 5) {
+ warn "You should 'use Sys::Socket' instead; continuing" # if $^W
+}
+
require 'syslog.ph';
+ eval 'require Socket' ||
+eval { require "socket.ph" } ||
+ require "sys/socket.ph";
+
$maskpri = &LOG_UPTO(&LOG_DEBUG);
sub main'openlog {
@@ -141,16 +149,16 @@ sub xlate {
sub connect {
$pat = 'S n C4 x8';
- $af_unix = 1;
- $af_inet = 2;
+ $af_unix = &AF_UNIX;
+ $af_inet = &AF_INET;
- $stream = 1;
- $datagram = 2;
+ $stream = &SOCK_STREAM;
+ $datagram = &SOCK_DGRAM;
($name,$aliases,$proto) = getprotobyname('udp');
$udp = $proto;
- ($name,$aliase,$port,$proto) = getservbyname('syslog','udp');
+ ($name,$aliases,$port,$proto) = getservbyname('syslog','udp');
$syslog = $port;
if (chop($myname = `hostname`)) {