Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 249668
Collapse All | Expand All

(-)FuzzyOcr.pm (-2 / +2 lines)
Lines 8-11 Link Here
8
use strict;
8
use strict;
9
use warnings;
9
use warnings;
10
use POSIX;
11
use Fcntl ':flock';
10
use Mail::SpamAssassin;
12
use Mail::SpamAssassin;
11
use Mail::SpamAssassin::Logger;
13
use Mail::SpamAssassin::Logger;
Lines 17-22 Link Here
17
use String::Approx 'adistr';
19
use String::Approx 'adistr';
18
use FileHandle;
20
use FileHandle;
19
use Fcntl ':flock';
20
use POSIX;
21
21
22
use lib qw(/etc/mail/spamassassin); # Allow placing of FuzzyOcr in siteconfigdir 
22
use lib qw(/etc/mail/spamassassin); # Allow placing of FuzzyOcr in siteconfigdir 
(-)FuzzyOcr/Misc.pm (-4 / +3 lines)
Lines 9-14 Link Here
9
use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
9
use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
10
use Time::HiRes qw( gettimeofday tv_interval );
10
use Time::HiRes qw( gettimeofday tv_interval );
11
use POSIX qw(WIFEXITED WIFSIGNALED WIFSTOPPED WEXITSTATUS WTERMSIG WSTOPSIG
11
use POSIX qw(WIFEXITED WIFSIGNALED WIFSTOPPED WEXITSTATUS WTERMSIG WSTOPSIG);
12
             O_RDONLY O_WRONLY O_RDWR O_APPEND O_CREAT O_EXCL);
13
12
14
# Provide some misc helper functions
13
# Provide some misc helper functions
Lines 71-76 Link Here
71
  my($flags) = 0; my($mode) = 0640;
70
  my($flags) = 0; my($mode) = 0640;
72
  $fname =~ s/^< *//;
71
  $fname =~ s/^< *//;
73
  $fname =~ s/^>> *// and $flags |= O_CREAT|O_WRONLY|O_APPEND;
72
  $fname =~ s/^>> *// and $flags |= POSIX::O_CREAT|POSIX::O_WRONLY|POSIX::O_APPEND;
74
  $fname =~ s/^> *//  and $flags |= O_CREAT|O_WRONLY;
73
  $fname =~ s/^> *//  and $flags |= POSIX::O_CREAT|POSIX::O_WRONLY;
75
  POSIX::close($fd_target);  # ignore error, we may have just closed a log
74
  POSIX::close($fd_target);  # ignore error, we may have just closed a log
76
  my($fd_got) = POSIX::open($fname,$flags,$mode);
75
  my($fd_got) = POSIX::open($fname,$flags,$mode);

Return to bug 249668