Re: [Bug-tar] creat-safer vs. text mode platforms

2006-03-17 Thread Joerg Schilling
Eric Blake <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On non-POSIX platforms like cygwin, where text mode can be distinct from > binary mode, creat() will create a text-mode file. But in tar, this is > the wrong thing to do, since text mode corrupts the binar

Re: creat-safer vs. text mode platforms

2006-03-15 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > Should we replace all uses of "creat (name, mode)" (such as in > creat-safer.c) with "open (name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, > mode)", with O_BINARY properly defined to 0 on POSIX systems? That might make sense for some instances of creat, bu

creat-safer vs. text mode platforms

2006-03-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On non-POSIX platforms like cygwin, where text mode can be distinct from binary mode, creat() will create a text-mode file. But in tar, this is the wrong thing to do, since text mode corrupts the binary archive. Should we replace all uses of "creat (n