tags 579533 +patch thanks Le jeudi 29 avril 2010 17:10:29 Clint Adams, vous avez écrit : > On Thu, Apr 29, 2010 at 01:58:25PM +0200, Didier 'OdyX' Raboud wrote: > > Little update (from my rapid analysis): it seems that the UNIXes \n which > > were written as \n by cpio-win32_2.9-15 went then written as \r\n by > > cpio- win32_2.9.90-2. My example file had 16 lines (so 16 \n ), so > > that's where the 16 bytes diff came from. > > > > Now it remains to see where those \r might come from. > > > > (I just saw your update…) > > SET_BINARY_MODE() is likely your culprit.
Hi again, the attached patch solves this: in fact it is just Robert's fix for #464172 that wasn't applied anymore for some reason. [By the way, I had hard time to find what was from upstream and what was part of the patches; Robert's had been lost sometime back in an upstream upgrade. Why not using quilt patches (as you already are using 3.0 (quilt))? Anyway: I can quilt'ify the patches over cpio if you want: just ask. ] Cheers, OdyX -- Didier Raboud, proud Debian Maintainer (DM). CH-1020 Renens did...@raboud.com
Description: Fix corrupted output in -win32 build Author: Robert Millan <r...@aybabtu> and Didier Raboud <did...@raboud.com> Origin: vendor Bugs: http://bugs.debian.org/579533 http://bugs.debian.org/464172 Last-Update: 2010-04-29 Index: cpio/gnu/fcntl.in.h =================================================================== --- cpio.orig/gnu/fcntl.in.h 2010-04-29 18:29:01.000000000 +0200 +++ cpio/gnu/fcntl.in.h 2010-04-29 18:29:31.000000000 +0200 @@ -234,7 +234,10 @@ # undef O_TEXT #endif -#ifndef O_BINARY +#ifdef O_BINARY +# define SET_BINARY_MODE(arc) setmode(arc, O_BINARY) +#else +# define SET_BINARY_MODE(arc) # define O_BINARY 0 # define O_TEXT 0 #endif Index: cpio/lib/system.h =================================================================== --- cpio.orig/lib/system.h 2010-04-29 18:29:01.000000000 +0200 +++ cpio/lib/system.h 2010-04-29 18:29:09.000000000 +0200 @@ -109,9 +109,6 @@ # define O_TRUNC 32 /* truncate file on open */ #endif -#ifndef O_BINARY -# define O_BINARY 0 -#endif #ifndef O_DIRECTORY # define O_DIRECTORY 0 #endif @@ -462,13 +459,11 @@ #if MSDOS # include <process.h> -# define SET_BINARY_MODE(arc) setmode(arc, O_BINARY) # define ERRNO_IS_EACCES errno == EACCES # define mkdir(file, mode) (mkdir) (file) # define TTY_NAME "con" # define sys_reset_uid_gid() #else -# define SET_BINARY_MODE(arc) # define ERRNO_IS_EACCES 0 # define TTY_NAME "/dev/tty" # define sys_reset_uid_gid() \
signature.asc
Description: This is a digitally signed message part.