KO Myung-Hun wrote: > > > Paul Eggert wrote: >> Myung-Hun KO wrote: >>> But any special reasons why binary-io module of gnulib should >>> be used instead of pre-existent SET_BINARY_MODE() ? In addition, >>> SET_BINARY_MODE() is being used already. >> >> My impression is that the proposed patch is reimplementing binary-io, >> which would mean it's better to bite the bullet and just use it. >> >> > > I've updated the patches. > > > > 0001-lib-define-wrapper-macros-for-OS-2.patch > > > From 51de6602e22f05c4a0923f43e631390634d9fe36 Mon Sep 17 00:00:00 2001 > From: KO Myung-Hun <k...@chollian.net> > Date: Tue, 9 Sep 2014 17:43:17 +0900 > Subject: [PATCH] lib: define wrapper macros for OS/2 > > * lib/system.h: Define wrapper macros for OS/2 > --- > lib/system.h | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/lib/system.h b/lib/system.h > index e7f531c..aa2404a 100644 > --- a/lib/system.h > +++ b/lib/system.h > @@ -467,11 +467,15 @@ char *getenv (); > # include <grp.h> > #endif > > -#if MSDOS > -# include <process.h> > +#if MSDOS || defined(__OS2__) > +# ifdef __OS2__ > +# include <io.h> /* setmode() */ > +# else > +# include <process.h> > +# define mkdir(file, mode) (mkdir) (file) > +# endif > # 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 > > > 0001-tar-set-stdout-to-binary-mode-if-writing-archives-to.patch > > > From 4e438f6dcad8fdfc90923109569b1eda4d02f790 Mon Sep 17 00:00:00 2001 > From: KO Myung-Hun <k...@chollian.net> > Date: Tue, 18 Nov 2014 11:54:47 +0900 > Subject: [PATCH] tar: set stdout to binary mode if writing archives to stdout > > * src/buffer.c (_open_archive): set stdout to binary mode if writing > archives to stdout. > --- > src/buffer.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/buffer.c b/src/buffer.c > index a7d8971..be992c1 100644 > --- a/src/buffer.c > +++ b/src/buffer.c > @@ -828,6 +828,8 @@ _open_archive (enum access_mode wanted_access) > sys_detect_dev_null_output (); > sys_save_archive_dev_ino (); > SET_BINARY_MODE (archive); > + if (write_archive_to_stdout) > + SET_BINARY_MODE (STDOUT_FILENO); > > switch (wanted_access) > {
-- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.ecomstation.co.kr