On Wed, Oct 26, 2005 at 04:27:44PM +0400, Dmitry V. Levin wrote: > On Sun, Oct 23, 2005 at 11:07:59AM +0200, Jim Meyering wrote: > > ** Binary input and output are now implemented more consistently. > > These changes affect only platforms like MS-DOS that distinguish > > between binary and text files. > > Unfortunately, these changes affect GNU/Linux, too. > > [...] > > md5sum and sha1sum now obey the -b or --binary option, even if > > standard input is a terminal, and they no longer report files to be > > binary if they actually read them in text mode. > > On GNU/Linux, O_BINARY is 0 and default mode is binary. > As result, by default a character indicating type is now "*" instead of > previous " ", and this change breaks third party scripts which relay on > old md5sum/sha1sum output format.
I'm going to apply attached patch for coreutils packages I maintain. -- ldv
2005-10-26 Dmitry V. Levin <[EMAIL PROTECTED]>
* src/md5sum.c (main) [!O_BINARY]: Changed default read mode
back to text, to sync with documentation and for backwards
compatibility.
--- coreutils-5.92/src/md5sum.c.orig 2005-08-14 15:13:28 +0000
+++ coreutils-5.92/src/md5sum.c 2005-10-26 13:09:51 +0000
@@ -612,6 +612,9 @@ main (int argc, char **argv)
usage (EXIT_FAILURE);
}
+ if (!O_BINARY && binary < 0)
+ binary = 0;
+
if (optind == argc)
argv[argc++] = "-";
pgp2LbUEI6mtU.pgp
Description: PGP signature
_______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
