Bug#5039: a couple of patches to perl lib files
Package: perl
Version: 5.003-2
Perl's sys/cdefs.ph contains a couple of lines which produce warning
output when perl is run undef -w. This can be fixed with this patch,
though this may not be the best way to do it.
to /usr/lib/perl5/i486-linux/5.003/sys/cdefs.ph...
------------------------------------------------------------------------
--- cdefs.ph.orig Mon Oct 28 21:32:28 1996
+++ cdefs.ph Mon Oct 28 21:35:06 1996
@@ -63,7 +63,6 @@
else {
if (!defined &__P) {
eval 'sub __P {
- local($args) = @_;
eval "()";
}';
}
@@ -89,7 +88,7 @@
}
else {
eval 'sub __CONCAT {
- local($x,$y) = @_;
+ local($x) = @_;
eval " &xy";
}';
eval 'sub __STRING {
------------------------------------------------------------------------
More importantly, to get the Sys::Syslog module to work at all, I had
to do what you see below. I don't know if the original failure to
work over UDP is a problem with perl or syslog, but this patch has the
practical effect of making things work. l-)
to /usr/lib/perl5/Sys/Syslog.pm...
------------------------------------------------------------------------
--- Syslog.pm.orig Mon Oct 28 21:17:41 1996
+++ Syslog.pm Mon Oct 28 22:35:48 1996
@@ -89,8 +89,6 @@
=cut
-$host = hostname() unless $host; # set $Syslog::host to change
-
require 'syslog.ph';
$maskpri = &LOG_UPTO(&LOG_DEBUG);
@@ -169,11 +167,10 @@
$whoami .= "[$$]" if $lo_pid;
$mask =~ s/%m/$!/g;
- $mask .= "\n" unless $mask =~ /\n$/;
$message = sprintf ($mask, @_);
$sum = $numpri + $numfac;
- unless (send(SYSLOG,"<$sum>$whoami: $message",0)) {
+ unless (send(SYSLOG,"<$sum>$whoami: $message\0",0)) {
if ($lo_cons) {
if ($pid = fork) {
unless ($lo_nowait) {
@@ -199,16 +196,9 @@
}
sub connect {
- unless ($host) {
- require Sys::Hostname;
- $host = Sys::Hostname::hostname();
- }
- my $udp = getprotobyname('udp');
- my $syslog = getservbyname('syslog','udp');
- my $this = sockaddr_in($syslog, INADDR_ANY);
- my $that = sockaddr_in($syslog, inet_aton($host) || croak "Can't lookup $host");
- socket(SYSLOG,AF_INET,SOCK_DGRAM,$udp) || croak "socket: $!";
- connect(SYSLOG,$that) || croak "connect: $!";
+ my $that = sockaddr_un("/dev/log");
+ socket(SYSLOG, AF_UNIX, SOCK_STREAM, 0) || croak "socket: $!";
+ connect(SYSLOG, $that) || croak "connect: /dev/log: $!";
local($old) = select(SYSLOG); $| = 1; select($old);
$connected = 1;
}
------------------------------------------------------------------------
--
Richard Kettlewell http://www.elmail.co.uk/staff/richard/
uk.legal: Why clog up newsgroups with shit when they are already
clogged with people from Whitby?
Mike Corley: Well, why not? It's something to do, isn't it?
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: