X-Git-Url: http://git.rot13.org//?a=blobdiff_plain;f=configure.pl;h=1fea712f427e42ef676a5555276c3a90f23b45b4;hb=8d7768574bb328c669a44c6efbff01e8a7e93d7e;hp=b98bccc96c38a3b9078d115ff2b812e53a99763b;hpb=74dc9d456332757127d5eda4ce32f29377133fa2;p=BackupPC.git diff --git a/configure.pl b/configure.pl index b98bccc..1fea712 100755 --- a/configure.pl +++ b/configure.pl @@ -40,6 +40,7 @@ #======================================================================== use strict; +no utf8; use vars qw(%Conf %OrigConf); use lib "./lib"; @@ -544,7 +545,8 @@ if ( -f $dest && !-f $confCopy ) { unless chown($uid, $gid, $confCopy); die("can't chmod $mode $confCopy\n") unless chmod($mode, $confCopy); } -open(OUT, ">$dest") || die("can't open $dest for writing\n"); +open(OUT, ">", $dest) || die("can't open $dest for writing\n"); +binmode(OUT); my $blockComment; foreach my $var ( @$newConf ) { if ( length($blockComment) @@ -636,8 +638,10 @@ sub InstallFile if ( $binary ) { die("can't copy($prog, $dest)\n") unless copy($prog, $dest); } else { - open(PROG, $prog) || die("can't open $prog for reading\n"); - open(OUT, ">$dest") || die("can't open $dest for writing\n"); + open(PROG, $prog) || die("can't open $prog for reading\n"); + open(OUT, ">", $dest) || die("can't open $dest for writing\n"); + binmode(PROG); + binmode(OUT); while ( ) { s/__INSTALLDIR__/$Conf{InstallDir}/g; s/__TOPDIR__/$Conf{TopDir}/g; @@ -681,6 +685,7 @@ sub ConfigParse { my($file) = @_; open(C, $file) || die("can't open $file"); + binmode(C); my($out, @conf, $var); my $comment = 1; my $allVars = {};