From: Paul Eggert Date: Sun, 3 Jul 2005 07:18:21 +0000 (+0000) Subject: Include stdio--.h. X-Git-Tag: CPPI-1_12~383 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3fff9c1441fb00e94c5e7e660a2b9891820891b3;p=thirdparty%2Fcoreutils.git Include stdio--.h. (digest_check): Don't try to read both checksums and data from stdin. --- diff --git a/src/md5sum.c b/src/md5sum.c index 0fca7aa8c5..e7eac04372 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -31,6 +31,7 @@ #include "getline.h" #include "error.h" #include "quote.h" +#include "stdio--.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME (algorithm == ALG_MD5 ? "md5sum" : "sha1sum") @@ -415,6 +416,7 @@ digest_check (const char *checkfile_name, int (*digest_stream) (FILE *, void *)) line[--line_length] = '\0'; if (! (split_3 (line, line_length, &hex_digest, &binary, &filename) + && ! (is_stdin && STREQ (filename, "-")) && hex_digits (hex_digest))) { if (warn)