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 80

Regular 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?

_______________________________________________
Lzip-bug mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lzip-bug

Reply via email to