|
From: | JonY |
Subject: | [Lzip-bug] Re: Version 1.11-rc2 of lzip released |
Date: | Fri, 30 Jul 2010 23:19:26 +0800 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0 |
On 7/30/2010 21:45, Antonio Diaz Diaz wrote:
JonY wrote:sorry, its not working on win32. testing lzip...in copy differ: char 2, line 1 ........... out: decoder error at pos 80Regular files pass the test (see the 11 dots above). Did you patch it to set stdin/stdout in binary mode? As I said to Elbert, I have solved binary mode for regular files, not for stdin/stdout. You still need to patch main.cc and lziprecover.cc to set stdin/stdout in binary mode.
Hi,Setting to stdin and stdout implicitly to binary mode at the beginning of main solved the problems. Something like:
int main( const int argc, const char * const argv[] ) { + setmode(STDIN_FILENO, O_BINARY); + setmode(STDOUT_FILENO, O_BINARY); // Mapping from gzip/bzip2 style 1..9 compression modes // to the corresponding LZMA compression modes. Binary mode stdout doesn't affect text output like those from --help.setmode looks to be available with OS/2 as well, but its unrelated to BSD setmode.
There are some minor issues for win32 too, it doesn't have fchmod() and fchown() and some other permission related macros. How should these be dealt with in the long term?
[Prev in Thread] | Current Thread | [Next in Thread] |