Skip Menu |

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 90224
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: SAPER [...] cpan.org
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.34



Subject: Conditionalize the use of setlocale/LC_TIME
If perl is built with -Ud_setlocale, or the OS doesn't support it (like in WinCE or Android, where setlocale is just a stub), then usign setlocale() might give errors saying that the function isn't implemented. @@ -429,14 +429,20 @@ sub syslog { $buf = $message; } else { + require Config; my $whoami = $ident; $whoami .= "[$$]" if $options{pid}; $sum = $numpri + $numfac; - my $oldlocale = setlocale(LC_TIME); - setlocale(LC_TIME, 'C'); + my $oldlocale; + if ( $Config::Config{d_setlocale} ) { + $oldlocale = setlocale(LC_TIME); + setlocale(LC_TIME, 'C'); + } my $timestamp = strftime "%b %d %H:%M:%S", localtime; - setlocale(LC_TIME, $oldlocale); + if ( $Config::Config{d_setlocale} ) { + setlocale(LC_TIME, $oldlocale); + } # construct the stream that will be transmitted $buf = "<$sum>$timestamp $whoami: $message";
Subject: Re: [rt.cpan.org #90224] Conditionalize the use of setlocale/LC_TIME
Date: Thu, 21 Nov 2013 01:24:32 +0100
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Brian Fraser wrote via RT: Show quoted text
> If perl is built with -Ud_setlocale, or the OS doesn't support it (like in WinCE or Android, where setlocale is just a stub), then usign setlocale() might give errors saying that the function isn't implemented.
(Same problem, therefore same remark than in #90218) -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
This issue should be fixed with version 0.34, just released. -- Close the world, txEn eht nepO.