On Thu, Apr 29, 2010 at 07:43:31PM +0200, Didier 'OdyX' Raboud wrote:
> 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. ]

Well, ideally we could get this fixed upstream.

Sergey, do you have a more general fix for the attached patch?
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() \

Reply via email to