summaryrefslogtreecommitdiff
path: root/src/md5sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-16 09:28:34 +0000
committerJim Meyering <jim@meyering.net>2001-09-16 09:28:34 +0000
commit4d87cd7f5cfb5739ce5d1410106e949ff7cdd98c (patch)
tree380660a75d8079ad4f035ea31d9b7ab279ce1cb5 /src/md5sum.c
parent1b863154134a7999693a6320fb11022e51edc1ea (diff)
downloadcoreutils-4d87cd7f5cfb5739ce5d1410106e949ff7cdd98c.tar.xz
(digest_check): On systems for which setmode actually
does something, arrange to read the file containing checksum strings in text mode. Based on a patch from Chris Faylor.
Diffstat (limited to 'src/md5sum.c')
-rw-r--r--src/md5sum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/md5sum.c b/src/md5sum.c
index 92dde2b9d..d20a7db3f 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -1,5 +1,5 @@
/* Compute MD5 or SHA1 checksum of files or strings
- Copyright (C) 1995-2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -339,6 +339,7 @@ digest_check (const char *checkfile_name, int (*digest_stream)(FILE *, void *))
}
}
+ SET_MODE (fileno (checkfile_stream), O_TEXT);
line_number = 0;
line = NULL;
line_chars_allocated = 0;