From unknown Sat Aug 09 13:07:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50167 <50167@debbugs.gnu.org> To: bug#50167 <50167@debbugs.gnu.org> Subject: Status: fixes for "fmt - -" etc. Reply-To: bug#50167 <50167@debbugs.gnu.org> Date: Sat, 09 Aug 2025 20:07:49 +0000 retitle 50167 fixes for "fmt - -" etc. reassign 50167 coreutils submitter 50167 Paul Eggert severity 50167 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 16:13:11 2021 Received: (at submit) by debbugs.gnu.org; 22 Aug 2021 20:13:11 +0000 Received: from localhost ([127.0.0.1]:39844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtq9-0000w8-Ug for submit@debbugs.gnu.org; Sun, 22 Aug 2021 16:13:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:54454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtq7-0000w0-EU for submit@debbugs.gnu.org; Sun, 22 Aug 2021 16:13:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHtq7-0008ML-5Z for bug-coreutils@gnu.org; Sun, 22 Aug 2021 16:13:07 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHtq2-0003wj-Bu for bug-coreutils@gnu.org; Sun, 22 Aug 2021 16:13:05 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1BAFD160078 for ; Sun, 22 Aug 2021 13:12:59 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Np6FAwiE-O6Q for ; Sun, 22 Aug 2021 13:12:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 17CB316007D for ; Sun, 22 Aug 2021 13:12:54 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id q9Ezqc_bAIFx for ; Sun, 22 Aug 2021 13:12:53 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D142C160078 for ; Sun, 22 Aug 2021 13:12:53 -0700 (PDT) To: Coreutils From: Paul Eggert Subject: fixes for "fmt - -" etc. Organization: UCLA Computer Science Department Message-ID: Date: Sun, 22 Aug 2021 13:12:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------90C2FE42C3C7B97B5D111C2D" Content-Language: en-US Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------90C2FE42C3C7B97B5D111C2D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit After finding a similar problem in GNU grep, I audited coreutils for issues involving reading stdin twice, or neglecting to report read errors, and installed the attached. The 2nd patch does the real work; the rest is merely doc or Gnulib patches. --------------90C2FE42C3C7B97B5D111C2D Content-Type: text/x-patch; charset=UTF-8; name="0001-doc-spell-out-stdin-stdout-stderr.patch" Content-Disposition: attachment; filename="0001-doc-spell-out-stdin-stdout-stderr.patch" Content-Transfer-Encoding: quoted-printable >From b6a0654e04482f400eb2d5752ec13e15eb53743c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 22 Aug 2021 11:24:29 -0700 Subject: [PATCH 1/4] doc: spell out stdin, stdout, stderr MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * doc/coreutils.texi: Spell out words like =E2=80=9Cstdin=E2=80=9D in English prose. --- doc/coreutils.texi | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 9cc14c008..a435ed63e 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -2291,7 +2291,8 @@ basenc @var{encoding} --decode [@var{option}]@dots{= } [@var{file}] @end example =20 The @var{encoding} argument is required. If @var{file} is omitted, -reads input from stdin. The @option{-w/--wrap},@option{-i/--ignore-garba= ge}, +@command{basenc} reads from standard input. +The @option{-w/--wrap},@option{-i/--ignore-garbage}, @option{-d/--decode} options of this command are precisely the same as for @command{base64}. @xref{base64 invocation}. =20 @@ -3356,11 +3357,11 @@ Split @var{input} to @var{chunks} output files wh= ere @var{chunks} may be: =20 @example @var{n} generate @var{n} files based on current size of @var{input} -@var{k}/@var{n} only output @var{k}th of @var{n} to stdout +@var{k}/@var{n} output only @var{k}th of @var{n} to standard output l/@var{n} generate @var{n} files without splitting lines or records -l/@var{k}/@var{n} likewise but only output @var{k}th of @var{n} to stdo= ut +l/@var{k}/@var{n} likewise but output only @var{k}th of @var{n} to stdo= ut r/@var{n} like @samp{l} but use round robin distribution -r/@var{k}/@var{n} likewise but only output @var{k}th of @var{n} to stdo= ut +r/@var{k}/@var{n} likewise but output only @var{k}th of @var{n} to stdo= ut @end example =20 Any excess bytes remaining after dividing the @var{input} @@ -4050,7 +4051,7 @@ for reading standard input when standard input is a= terminal. @item -c @itemx --check Read file names and checksum information (not data) from each -@var{file} (or from stdin if no @var{file} was specified) and report +@var{file} (or from standard input if no @var{file} was specified) and r= eport whether the checksums match the contents of the named files. The input to this mode of @command{md5sum} is usually the output of a prior, checksum-generating run of @samp{md5sum}. @@ -4579,7 +4580,7 @@ of the line being used in the sort. =20 @item --debug Highlight the portion of each line used for sorting. -Also issue warnings about questionable usage to stderr. +Also issue warnings about questionable usage to standard error. =20 @item --batch-size=3D@var{nmerge} @opindex --batch-size @@ -6228,7 +6229,7 @@ $ paste num2 let3 num2 @ c @end example =20 -Intermix lines from stdin: +Intermix lines from standard input: @example $ paste - let3 - < num2 1 a 2 @@ -9186,7 +9187,7 @@ The @var{level} value can be one of the following: =20 @item none @opindex none @r{dd status=3D} -Do not print any informational or warning messages to stderr. +Do not print any informational or warning messages to standard error. Error messages are output as normal. =20 @item noxfer @@ -9196,14 +9197,14 @@ that normally make up the last status line. =20 @item progress @opindex progress @r{dd status=3D} -Print the transfer rate and volume statistics on stderr, +Print the transfer rate and volume statistics on standard error, when processing each input block. Statistics are output on a single line at most once every second, but updates can be delayed when waiting on I/O. =20 @end table =20 -Transfer information is normally output to stderr upon +Transfer information is normally output to standard error upon receipt of the @samp{INFO} signal or when @command{dd} exits, and defaults to the following form in the C locale: =20 @@ -13837,7 +13838,7 @@ it's described here. @pindex tee @cindex pipe fitting @cindex destinations, multiple output -@cindex read from stdin and write to stdout and files +@cindex read from standard input and write to standard output and files =20 The @command{tee} command copies standard input to standard output and a= lso to any files given as arguments. This is useful when you want not only @@ -13941,7 +13942,7 @@ so it works with @command{zsh}, @command{bash}, a= nd @command{ksh}, but not with @command{/bin/sh}. So if you write code like this in a shell script, be sure to start the script with @samp{#!/bin/bash}. =20 -Note also that if any of the process substitutions (or piped stdout) +Note also that if any of the process substitutions (or piped standard ou= tput) might exit early without consuming all the data, the @option{-p} option is needed to allow @command{tee} to continue to process the input to any remaining outputs. @@ -17462,7 +17463,7 @@ env --default-signal=3DINT,PIPE --ignore-signal=3D= INT Block signal(s) @var{sig} from being delivered. =20 @item --list-signal-handling -List blocked or ignored signals to stderr, before executing a command. +List blocked or ignored signals to standard error, before executing a co= mmand. =20 @item -v @itemx --debug @@ -18234,7 +18235,7 @@ or a number. @xref{Signal specifications}. @itemx --verbose @opindex -v @opindex --verbose -Diagnose to stderr, any signal sent upon timeout. +Diagnose to standard error, any signal sent upon timeout. @end table =20 @cindex time units --=20 2.31.1 --------------90C2FE42C3C7B97B5D111C2D Content-Type: text/x-patch; charset=UTF-8; name="0002-maint-use-clearerr-on-stdin-when-appropriate.patch" Content-Disposition: attachment; filename="0002-maint-use-clearerr-on-stdin-when-appropriate.patch" Content-Transfer-Encoding: quoted-printable >From 074424d5666e3499132421d67dfe50e1702bcbae Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 22 Aug 2021 11:54:44 -0700 Subject: [PATCH 2/4] maint: use clearerr on stdin when appropriate MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This is so that commands like =E2=80=98fmt - -=E2=80=99 read from stdin both times, even when it is a tty. Fix some other minor issues that are related. * src/blake2/b2sum.c (main): * src/cksum.c (cksum): * src/cut.c (cut_file): * src/expand-common.c (next_file): * src/fmt.c (fmt): * src/fold.c (fold_file): * src/md5sum.c (digest_file, digest_check): * src/nl.c (nl_file): * src/od.c (check_and_close): * src/paste.c (paste_parallel, paste_serial): * src/pr.c (close_file): * src/sum.c (bsd_sum_file): Use clearerr on stdin so that stdin can be read multiple times even if it is a tty. Do not assume that ferror preserves errno as POSIX does not guarantee this. Coalesce duplicate diagnostic calls. * src/blake2/b2sum.c (main): * src/fmt.c (main, fmt): Report read error, even if it's merely fclose failure. * src/fmt.c: Include die.h. (fmt): New arg FILE. Close input (reporting error) if not stdin. All callers changed. * src/ptx.c (swallow_file_in_memory): Clear stdin's EOF flag. * src/sort.c (xfclose): Remove unnecessary feof call. --- src/blake2/b2sum.c | 5 ++++- src/cksum.c | 19 +++++++++---------- src/cut.c | 12 ++++++------ src/expand-common.c | 12 ++++++------ src/fmt.c | 45 +++++++++++++++++++++++++++++++-------------- src/fold.c | 16 ++++++++-------- src/md5sum.c | 31 +++++++++++++++---------------- src/nl.c | 14 +++++++------- src/od.c | 17 ++++++++--------- src/paste.c | 26 ++++++++++++-------------- src/pr.c | 14 ++++++++++---- src/ptx.c | 3 +++ src/sort.c | 3 +-- src/sum.c | 19 +++++++++---------- 14 files changed, 129 insertions(+), 107 deletions(-) diff --git a/src/blake2/b2sum.c b/src/blake2/b2sum.c index 9f1108137..0a2387b39 100644 --- a/src/blake2/b2sum.c +++ b/src/blake2/b2sum.c @@ -388,7 +388,10 @@ int main( int argc, char **argv ) printf( " %s\n", argv[i] ); } =20 - if( f !=3D stdin ) fclose( f ); + if( f =3D=3D stdin ) + clearerr( f ); + else if( fclose( f ) !=3D 0 ) + fprintf( stderr, "Could not close `%s': %s\n", argv[i], strerror( = errno ) ); } =20 return 0; diff --git a/src/cksum.c b/src/cksum.c index c3416f866..3cc4296bc 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -298,17 +298,16 @@ cksum (char const *file, bool print_name) if (! cksum_fp (fp, file, &crc, &length)) return false; =20 - if (ferror (fp)) - { - error (0, errno, "%s", quotef (file)); - if (!STREQ (file, "-")) - fclose (fp); - return false; - } - - if (!STREQ (file, "-") && fclose (fp) =3D=3D EOF) + int err =3D errno; + if (!ferror (fp)) + err =3D 0; + if (STREQ (file, "-")) + clearerr (fp); + else if (fclose (fp) !=3D 0 && !err) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (file)); + error (0, err, "%s", quotef (file)); return false; } =20 diff --git a/src/cut.c b/src/cut.c index f4d44c211..cdf33d897 100644 --- a/src/cut.c +++ b/src/cut.c @@ -460,16 +460,16 @@ cut_file (char const *file) =20 cut_stream (stream); =20 - if (ferror (stream)) - { - error (0, errno, "%s", quotef (file)); - return false; - } + int err =3D errno; + if (!ferror (stream)) + err =3D 0; if (STREQ (file, "-")) clearerr (stream); /* Also clear EOF. */ else if (fclose (stream) =3D=3D EOF) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (file)); + error (0, err, "%s", quotef (file)); return false; } return true; diff --git a/src/expand-common.c b/src/expand-common.c index 55df8dc0f..4deb7bd8a 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -338,16 +338,16 @@ next_file (FILE *fp) if (fp) { assert (prev_file); - if (ferror (fp)) - { - error (0, errno, "%s", quotef (prev_file)); - exit_status =3D EXIT_FAILURE; - } + int err =3D errno; + if (!ferror (fp)) + err =3D 0; if (STREQ (prev_file, "-")) clearerr (fp); /* Also clear EOF. */ else if (fclose (fp) !=3D 0) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (prev_file)); + error (0, err, "%s", quotef (prev_file)); exit_status =3D EXIT_FAILURE; } } diff --git a/src/fmt.c b/src/fmt.c index ca9231b99..bfccd9ba1 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -28,6 +28,7 @@ =20 #include "system.h" #include "error.h" +#include "die.h" #include "fadvise.h" #include "xdectoint.h" =20 @@ -151,7 +152,7 @@ struct Word /* Forward declarations. */ =20 static void set_prefix (char *p); -static void fmt (FILE *f); +static bool fmt (FILE *f, char const *); static bool get_paragraph (FILE *f); static int get_line (FILE *f, int c); static int get_prefix (FILE *f); @@ -412,28 +413,29 @@ main (int argc, char **argv) goal_width =3D max_width * (2 * (100 - LEEWAY) + 1) / 200; } =20 + bool have_read_stdin =3D false; + if (optind =3D=3D argc) - fmt (stdin); + { + have_read_stdin =3D true; + ok =3D fmt (stdin, "-"); + } else { for (; optind < argc; optind++) { char *file =3D argv[optind]; if (STREQ (file, "-")) - fmt (stdin); + { + ok &=3D fmt (stdin, file); + have_read_stdin =3D true; + } else { FILE *in_stream; in_stream =3D fopen (file, "r"); if (in_stream !=3D NULL) - { - fmt (in_stream); - if (fclose (in_stream) =3D=3D EOF) - { - error (0, errno, "%s", quotef (file)); - ok =3D false; - } - } + ok &=3D fmt (in_stream, file); else { error (0, errno, _("cannot open %s for reading"), @@ -444,6 +446,9 @@ main (int argc, char **argv) } } =20 + if (have_read_stdin && fclose (stdin) !=3D 0) + die (EXIT_FAILURE, errno, "%s", _("closing standard input")); + return ok ? EXIT_SUCCESS : EXIT_FAILURE; } =20 @@ -470,10 +475,13 @@ set_prefix (char *p) prefix_length =3D s - p; } =20 -/* read file F and send formatted output to stdout. */ +/* Read F and send formatted output to stdout. + Close F when done, unless F is stdin. Diagnose input errors, using F= ILE. + If !F, assume F resulted from an fopen failure and diagnose that. + Return true if successful. */ =20 -static void -fmt (FILE *f) +static bool +fmt (FILE *f, char const *file) { fadvise (f, FADVISE_SEQUENTIAL); tabs =3D false; @@ -484,6 +492,15 @@ fmt (FILE *f) fmt_paragraph (); put_paragraph (word_limit); } + + int err =3D ferror (f) ? 0 : -1; + if (f =3D=3D stdin) + clearerr (f); + else if (fclose (f) !=3D 0 && err < 0) + err =3D errno; + if (0 <=3D err) + error (0, err, err ? "%s" : _("read error"), quotef (file)); + return err < 0; } =20 /* Set the global variable 'other_indent' according to SAME_PARAGRAPH diff --git a/src/fold.c b/src/fold.c index ae33dd368..94a6d378e 100644 --- a/src/fold.c +++ b/src/fold.c @@ -216,20 +216,20 @@ fold_file (char const *filename, size_t width) } =20 saved_errno =3D errno; + if (!ferror (istream)) + saved_errno =3D 0; =20 if (offset_out) fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); =20 - if (ferror (istream)) + if (STREQ (filename, "-")) + clearerr (istream); + else if (fclose (istream) !=3D 0 && !saved_errno) + saved_errno =3D errno; + + if (saved_errno) { error (0, saved_errno, "%s", quotef (filename)); - if (!STREQ (filename, "-")) - fclose (istream); - return false; - } - if (!STREQ (filename, "-") && fclose (istream) =3D=3D EOF) - { - error (0, errno, "%s", quotef (filename)); return false; } =20 diff --git a/src/md5sum.c b/src/md5sum.c index cbfdc3ab2..e2071cfd2 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -631,17 +631,15 @@ digest_file (char const *filename, int *binary, uns= igned char *bin_result, #else err =3D DIGEST_STREAM (fp, bin_result); #endif - if (err) - { - error (0, errno, "%s", quotef (filename)); - if (fp !=3D stdin) - fclose (fp); - return false; - } + err =3D err ? errno : 0; + if (is_stdin) + clearerr (fp); + else if (fclose (fp) !=3D 0 && !err) + err =3D errno; =20 - if (!is_stdin && fclose (fp) !=3D 0) + if (err) { - error (0, errno, "%s", quotef (filename)); + error (0, err, "%s", quotef (filename)); return false; } =20 @@ -798,15 +796,16 @@ digest_check (char const *checkfile_name) =20 free (line); =20 - if (ferror (checkfile_stream)) - { - error (0, 0, _("%s: read error"), quotef (checkfile_name)); - return false; - } + int err =3D ferror (checkfile_stream) ? 0 : -1; + if (is_stdin) + clearerr (checkfile_stream); + else if (fclose (checkfile_stream) !=3D 0 && err < 0) + err =3D errno; =20 - if (!is_stdin && fclose (checkfile_stream) !=3D 0) + if (0 <=3D err) { - error (0, errno, "%s", quotef (checkfile_name)); + error (0, err, err ? "%s" : _("%s: read error"), + quotef (checkfile_name)); return false; } =20 diff --git a/src/nl.c b/src/nl.c index f3ba46c9b..7a13bcb97 100644 --- a/src/nl.c +++ b/src/nl.c @@ -457,16 +457,16 @@ nl_file (char const *file) =20 process_file (stream); =20 - if (ferror (stream)) - { - error (0, errno, "%s", quotef (file)); - return false; - } + int err =3D errno; + if (!ferror (stream)) + err =3D 0; if (STREQ (file, "-")) clearerr (stream); /* Also clear EOF. */ - else if (fclose (stream) =3D=3D EOF) + else if (fclose (stream) !=3D 0 && !err) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (file)); + error (0, err, "%s", quotef (file)); return false; } return true; diff --git a/src/od.c b/src/od.c index f04e0ccb7..111c94935 100644 --- a/src/od.c +++ b/src/od.c @@ -949,16 +949,15 @@ check_and_close (int in_errno) =20 if (in_stream !=3D NULL) { - if (ferror (in_stream)) + if (!ferror (in_stream)) + in_errno =3D 0; + if (STREQ (file_list[-1], "-")) + clearerr (in_stream); + else if (fclose (in_stream) !=3D 0 && !in_errno) + in_errno =3D errno; + if (in_errno) { - error (0, in_errno, _("%s: read error"), quotef (input_filenam= e)); - if (! STREQ (file_list[-1], "-")) - fclose (in_stream); - ok =3D false; - } - else if (! STREQ (file_list[-1], "-") && fclose (in_stream) !=3D 0= ) - { - error (0, errno, "%s", quotef (input_filename)); + error (0, in_errno, "%s", quotef (input_filename)); ok =3D false; } =20 diff --git a/src/paste.c b/src/paste.c index 48229acc5..f43fb56c2 100644 --- a/src/paste.c +++ b/src/paste.c @@ -266,16 +266,15 @@ paste_parallel (size_t nfiles, char **fnamptr) If an EOF or error, close the file. */ if (fileptr[i]) { - if (ferror (fileptr[i])) - { - error (0, err, "%s", quotef (fnamptr[i])); - ok =3D false; - } + if (!ferror (fileptr[i])) + err =3D 0; if (fileptr[i] =3D=3D stdin) clearerr (fileptr[i]); /* Also clear EOF. */ - else if (fclose (fileptr[i]) =3D=3D EOF) + else if (fclose (fileptr[i]) =3D=3D EOF && !err) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (fnamptr[i])); + error (0, err, "%s", quotef (fnamptr[i])); ok =3D false; } =20 @@ -410,16 +409,15 @@ paste_serial (size_t nfiles, char **fnamptr) if (charold !=3D line_delim) xputchar (line_delim); =20 - if (ferror (fileptr)) - { - error (0, saved_errno, "%s", quotef (*fnamptr)); - ok =3D false; - } + if (!ferror (fileptr)) + saved_errno =3D 0; if (is_stdin) clearerr (fileptr); /* Also clear EOF. */ - else if (fclose (fileptr) =3D=3D EOF) + else if (fclose (fileptr) !=3D 0 && !saved_errno) + saved_errno =3D errno; + if (saved_errno) { - error (0, errno, "%s", quotef (*fnamptr)); + error (0, saved_errno, "%s", quotef (*fnamptr)); ok =3D false; } } diff --git a/src/pr.c b/src/pr.c index da5795554..8f84d0f59 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1506,10 +1506,16 @@ close_file (COLUMN *p) =20 if (p->status =3D=3D CLOSED) return; - if (ferror (p->fp)) - die (EXIT_FAILURE, errno, "%s", quotef (p->name)); - if (fileno (p->fp) !=3D STDIN_FILENO && fclose (p->fp) !=3D 0) - die (EXIT_FAILURE, errno, "%s", quotef (p->name)); + + int err =3D errno; + if (!ferror (p->fp)) + err =3D 0; + if (fileno (p->fp) =3D=3D STDIN_FILENO) + clearerr (p->fp); + else if (fclose (p->fp) !=3D 0 && !err) + err =3D errno; + if (err) + die (EXIT_FAILURE, err, "%s", quotef (p->name)); =20 if (!parallel_files) { diff --git a/src/ptx.c b/src/ptx.c index 85c26aa1d..43075c840 100644 --- a/src/ptx.c +++ b/src/ptx.c @@ -526,6 +526,9 @@ swallow_file_in_memory (char const *file_name, BLOCK = *block) if (!block->start) die (EXIT_FAILURE, errno, "%s", quotef (using_stdin ? "-" : file_nam= e)); =20 + if (using_stdin) + clearerr (stdin); + block->end =3D block->start + used_length; } =20 diff --git a/src/sort.c b/src/sort.c index cba809c33..5f4c817de 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1001,8 +1001,7 @@ xfclose (FILE *fp, char const *file) { case STDIN_FILENO: /* Allow reading stdin from tty more than once. */ - if (feof (fp)) - clearerr (fp); + clearerr (fp); break; =20 case STDOUT_FILENO: diff --git a/src/sum.c b/src/sum.c index f9641dbb1..c17af3f6b 100644 --- a/src/sum.c +++ b/src/sum.c @@ -120,17 +120,16 @@ bsd_sum_file (char const *file, int print_name) checksum &=3D 0xffff; /* Keep it within bounds. */ } =20 - if (ferror (fp)) - { - error (0, errno, "%s", quotef (file)); - if (!is_stdin) - fclose (fp); - return false; - } - - if (!is_stdin && fclose (fp) !=3D 0) + int err =3D errno; + if (!ferror (fp)) + err =3D 0; + if (is_stdin) + clearerr (fp); + else if (fclose (fp) !=3D 0 && !err) + err =3D errno; + if (err) { - error (0, errno, "%s", quotef (file)); + error (0, err, "%s", quotef (file)); return false; } =20 --=20 2.31.1 --------------90C2FE42C3C7B97B5D111C2D Content-Type: text/x-patch; charset=UTF-8; name="0003-build-update-gnulib-submodule-to-latest.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0003-build-update-gnulib-submodule-to-latest.patch" >From 6e93074899332234d23a1698dc7f4168a793131d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 22 Aug 2021 11:56:54 -0700 Subject: [PATCH 3/4] build: update gnulib submodule to latest --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 53701517c..4ea0e64a8 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 53701517c6517e5161e4533e44c33b5e4db17314 +Subproject commit 4ea0e64a8db7064427f6aa5624a4efd4b41db132 -- 2.31.1 --------------90C2FE42C3C7B97B5D111C2D Content-Type: text/x-patch; charset=UTF-8; name="0004-df-pacify-Wsuggest-attribute-malloc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0004-df-pacify-Wsuggest-attribute-malloc.patch" >From 0b2148bdd0d93f16bef64d899a21487f33751445 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 22 Aug 2021 12:42:20 -0700 Subject: [PATCH 4/4] df: pacify -Wsuggest-attribute=malloc Problem found with latest Gnulib and GCC 11.2.1. * src/find-mount-point.h (find_mount_point): Add _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE. --- src/find-mount-point.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/find-mount-point.h b/src/find-mount-point.h index 028b2500c..a1bbcdc92 100644 --- a/src/find-mount-point.h +++ b/src/find-mount-point.h @@ -14,4 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -extern char *find_mount_point (char const *, struct stat const *); +#include + +extern char *find_mount_point (char const *, struct stat const *) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; -- 2.31.1 --------------90C2FE42C3C7B97B5D111C2D-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 16:17:32 2021 Received: (at control) by debbugs.gnu.org; 22 Aug 2021 20:17:32 +0000 Received: from localhost ([127.0.0.1]:39850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtuO-00013O-C0 for submit@debbugs.gnu.org; Sun, 22 Aug 2021 16:17:32 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtuL-00013B-OZ for control@debbugs.gnu.org; Sun, 22 Aug 2021 16:17:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78345160078 for ; Sun, 22 Aug 2021 13:17:24 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oyAugOrXfLxk for ; Sun, 22 Aug 2021 13:17:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DBA0F160099 for ; Sun, 22 Aug 2021 13:17:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uXJE2KHFnzpt for ; Sun, 22 Aug 2021 13:17:23 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id BEA3B16007D for ; Sun, 22 Aug 2021 13:17:23 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: 50167 is already fixed Organization: UCLA Computer Science Department Message-ID: <74840c58-c295-a07d-c132-1e25c54023f7@cs.ucla.edu> Date: Sun, 22 Aug 2021 13:17:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50167 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 15:42:51 2021 Received: (at 50167) by debbugs.gnu.org; 24 Aug 2021 19:42:51 +0000 Received: from localhost ([127.0.0.1]:45282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIcJu-00077L-NJ for submit@debbugs.gnu.org; Tue, 24 Aug 2021 15:42:50 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:45925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIcJs-000776-MR for 50167@debbugs.gnu.org; Tue, 24 Aug 2021 15:42:49 -0400 Received: from [192.168.101.10] ([91.12.164.105]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MdeOl-1mrfx034tt-00Zju1; Tue, 24 Aug 2021 21:42:31 +0200 Subject: Re: bug#50167: fixes for "fmt - -" etc. To: Paul Eggert , 50167@debbugs.gnu.org References: From: Bernhard Voelker Message-ID: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> Date: Tue, 24 Aug 2021 21:42:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------C0AAFD6287C33003F56A48D1" Content-Language: en-US X-Provags-ID: V03:K1:05i8ayIx9Du0Z4dYcEGnKuLADdtTASgX3Hqnnz5SGBZrwG7CLT7 mBXL8mpV8HZmdpraDyhrDczBA2nozv40N+HVbTO8Y7XX/X1d821pgNQ4sd0q9RZ7kdzbbSd 4Q58AJDjRfiiaYgxUsr5aqJXEJ+zTxRrctxexF+WLPRO2XKKFibo/sZRaOC8nWkphbE2H7N 06v64YBRHqq18OgtCzbdg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HvPSEUrBxKg=:dvE3zijl2SKEmMJAlmC2oJ WnUO0l7Lj53cYpzuLyEC46HjeUtnp2Fnghl96/7R01px44zXiwudIljCBf9Efmrm+58ZKHsVS NgxU5hmLpoFeNxzG0yW/bE/UYSh3vtu7dleLfF+BpouYNtnlq7o9pVfFpfwmbvQw3HM/lhChb 4sJauUxaxioiKPEURD1nteGlOCbVdNV3C4Hp35cmi4S1y3UDhtX7HBxRgTGJj1aaRfB9hmDE+ mpWZeG77K5vYSws54wyMu0nyrNyVU3gDucdPYJfiW9dpSuLbtOkAgOS/s7iuE7WHaavP4uArz xVbmJyOIBdzbzyTej7mXe5eKdv5Q5xCJTonfQpBUWvoqch8qgetlObn+Npygb5+/RufhzrjvB nd3CdCCGR+3UTl7yvxiJNF2PuDO7ePYz8R6fPzc1QrYhoACSrkfvS6oscQFlthgZy+0lXO0ma LAkaTlvwkquTCUK4JMHbbrkX/a5jliz4V3mIln/wS56CCIza/O+W1HhJwxevbxKGsEE+tGCyP 0qYtcJUDxiSNyR4VOMkynv6mIyN6o9JjNpAxfdbipCNdWMmrS0PdQcC949Nti2hdYhL7xaQ5S Gz+bqC27Si9qSRaH+JAvRb7jdGt1094lb7u3OmdptLwl3DkAOtwyn9rd89ggnp5zGK4R7/vyF STM65mZhzzHFElsbrLdbW9BWgYl63/j0H5te3o+MUgNgTFwevlIRlRNYUC+QCiK7yv/H/yU/A QZ0AMXEmMrnVaI+7J3kOhb/huj3M79bgR/05n5SO+yec+9mQnkWLeAjFnjA= X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 50167 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) This is a multi-part message in MIME format. --------------C0AAFD6287C33003F56A48D1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi Paul, On 8/22/21 10:12 PM, Paul Eggert wrote: > Subject: [PATCH 4/4] df: pacify -Wsuggest-attribute=malloc > > Problem found with latest Gnulib and GCC 11.2.1. > * src/find-mount-point.h (find_mount_point): > Add _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE. > --- > src/find-mount-point.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/find-mount-point.h b/src/find-mount-point.h > index 028b2500c..a1bbcdc92 100644 > --- a/src/find-mount-point.h > +++ b/src/find-mount-point.h > @@ -14,4 +14,7 @@ > You should have received a copy of the GNU General Public License > along with this program. If not, see . */ > > -extern char *find_mount_point (char const *, struct stat const *); > +#include > + > +extern char *find_mount_point (char const *, struct stat const *) > + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; `make syntax-check` complains: src/find-mount-point.h:17:#include maint.mk: the above are already included via system.h make: *** [cfg.mk:174: sc_system_h_headers] Error 1 The attached fixes it. Was there a particular reason to include stdlib.h? Have a nice day, Berny --------------C0AAFD6287C33003F56A48D1 Content-Type: text/x-patch; charset=UTF-8; name="0001-maint-avoid-sc_system_h_headers-error.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-maint-avoid-sc_system_h_headers-error.patch" >From fd277435c8cc4b758c101b9466fd8e86f4f37807 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Tue, 24 Aug 2021 21:32:26 +0200 Subject: [PATCH] maint: avoid sc_system_h_headers error `make syntax-check` complains: src/find-mount-point.h:17:#include maint.mk: the above are already included via system.h make: *** [cfg.mk:174: sc_system_h_headers] Error 1 * src/find-mount-point.h (#include ): Remove again. --- src/find-mount-point.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/find-mount-point.h b/src/find-mount-point.h index a1bbcdc92..be0d367be 100644 --- a/src/find-mount-point.h +++ b/src/find-mount-point.h @@ -14,7 +14,5 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - extern char *find_mount_point (char const *, struct stat const *) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; -- 2.32.0 --------------C0AAFD6287C33003F56A48D1-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 17:09:46 2021 Received: (at 50167) by debbugs.gnu.org; 24 Aug 2021 21:09:46 +0000 Received: from localhost ([127.0.0.1]:45324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIdg2-0000rt-HS for submit@debbugs.gnu.org; Tue, 24 Aug 2021 17:09:46 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIdg0-0000rd-LK for 50167@debbugs.gnu.org; Tue, 24 Aug 2021 17:09:45 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 67ADB160051; Tue, 24 Aug 2021 14:09:38 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0noitNdq1io3; Tue, 24 Aug 2021 14:09:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C049F1600BB; Tue, 24 Aug 2021 14:09:37 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4ktOQVGVP5E5; Tue, 24 Aug 2021 14:09:37 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9E5CD160051; Tue, 24 Aug 2021 14:09:37 -0700 (PDT) To: Bernhard Voelker References: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#50167: fixes for "fmt - -" etc. Message-ID: <27106b86-66ee-909e-2700-2ba50e0175aa@cs.ucla.edu> Date: Tue, 24 Aug 2021 14:09:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 50167 Cc: 50167@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 8/24/21 12:42 PM, Bernhard Voelker wrote: > Was there a particular reason to include stdlib.h? It's needed to declare 'free', which is used by _GL_ATTRIBUTE_DEALLOC_FR= EE. I added "#include " so that find-mount-point.h would be an=20 independent header, potentially useful outside coreutils. If that's the=20 intent, we should fix "make syntax-check" to not complain about this=20 situation. If it's not the intent then your patch looks good. Jim, what's your opinion on this? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 04:38:33 2021 Received: (at 50167) by debbugs.gnu.org; 25 Aug 2021 08:38:33 +0000 Received: from localhost ([127.0.0.1]:45641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIoQa-00050g-Uf for submit@debbugs.gnu.org; Wed, 25 Aug 2021 04:38:33 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:33430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIoQZ-00050R-0X for 50167@debbugs.gnu.org; Wed, 25 Aug 2021 04:38:32 -0400 Received: by mail-wr1-f45.google.com with SMTP id d26so14814016wrc.0 for <50167@debbugs.gnu.org>; Wed, 25 Aug 2021 01:38:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7lT8WQXHCsrpd3Y8n8u1ckhxTnn+PLMLs6NDGdRFsE8=; b=cxnR3hsB3pG/64+/iypBkiyPw5DtmiWnTqsng6q2tp/ykpzCXQT0OSK1fC7Hkn7ybW /J+pII0KHc9J2Iz/9wqFfOcL+9GA0kQVOv+RB/njb84r7SyNYO67n5qJKb+Ld7dBRVaW fatsy1AzTT13VWhD9pUVK2UV3FoVB6zEl8ayqZkiz2fxLnjqcjYWCU8evZGo87YYBona QWMAQ4HMt0YrC+SAaEz7LxCGCdYpaIeoVMvjwBKFG3+5egUXtyygg8B1o00MUWLiiark s/Azbx6NpPuAg3Dk1c6mE2lY8N0AOHPO0rRKR0SbKLtcXQyfluRS8pLRJCR9+WFuQ0ux IbWA== X-Gm-Message-State: AOAM533IUC3Qw7RsFbt+Wim1PInmt7UcRivmm9pgZ2ZkSKKRFvm4kw9U UuBF88xgozO1Ow4FarvRlPNwG4eEvoF7vdffUA0= X-Google-Smtp-Source: ABdhPJwUqzjYAAeBazer9vcmxudLAY3S8wbHtWft0nDQHBecekV+2Sb2V4O7+LRllF9lJG228EQkAejVTyY+bFxBA+w= X-Received: by 2002:a5d:508e:: with SMTP id a14mr23898383wrt.306.1629880705348; Wed, 25 Aug 2021 01:38:25 -0700 (PDT) MIME-Version: 1.0 References: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> <27106b86-66ee-909e-2700-2ba50e0175aa@cs.ucla.edu> In-Reply-To: <27106b86-66ee-909e-2700-2ba50e0175aa@cs.ucla.edu> From: Jim Meyering Date: Wed, 25 Aug 2021 10:38:13 +0200 Message-ID: Subject: Re: bug#50167: fixes for "fmt - -" etc. To: Paul Eggert Content-Type: multipart/mixed; boundary="000000000000781f0005ca5e2cf4" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50167 Cc: Bernhard Voelker , 50167@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000781f0005ca5e2cf4 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 24, 2021 at 11:10 PM Paul Eggert wrote: > On 8/24/21 12:42 PM, Bernhard Voelker wrote: > > Was there a particular reason to include stdlib.h? > > It's needed to declare 'free', which is used by _GL_ATTRIBUTE_DEALLOC_FREE. > > I added "#include " so that find-mount-point.h would be an > independent header, potentially useful outside coreutils. If that's the > intent, we should fix "make syntax-check" to not complain about this > situation. If it's not the intent then your patch looks good. > > Jim, what's your opinion on this? I propose this change: --000000000000781f0005ca5e2cf4 Content-Type: application/octet-stream; name="0001-maint-avoid-new-syntax-check-failure.patch" Content-Disposition: attachment; filename="0001-maint-avoid-new-syntax-check-failure.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ksr8voyt0 RnJvbSBlY2Q0YjBjZWJlZjNhMWE0ZDcyOWZmZDlhNDljZWY4MGEzNDQ0YTE2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog V2VkLCAyNSBBdWcgMjAyMSAwMTozNDoyNyAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIG1haW50OiBh dm9pZCBuZXcgc3ludGF4LWNoZWNrIGZhaWx1cmUKCmZpbmQtbW91bnQtcG9pbnQuaCByaWdodGx5 IGluY2x1ZGVzIDxzdGRsaWIuaD4gZm9yIGl0cyB1c2UKb2YgX0dMX0FUVFJJQlVURV9ERUFMTE9D X0ZSRUUsIHdoaWNoIHVzZXMgZnJlZSwgeWV0IHRoYXQgbmV3CmluY2x1c2lvbiBwcm92b2tlZCBh IHN5bnRheC1jaGVjayBmYWlsdXJlLiBFeGVtcHQgdGhpcyBoZWFkZXIKZmlsZSBhcyB3ZSd2ZSBk b25lIGZvciBvdGhlcnMuCiogY2ZnLm1rIChleGNsdWRlX2ZpbGVfbmFtZV9yZWdleHAtLXNjX3N5 c3RlbV9oX2hlYWRlcnMpOgpBZGQgZmluZC1tb3VudC1wb2ludC5oIHRvIHRoZSByZWdleHAuCihz Y19zeXN0ZW1faF9oZWFkZXJzKTogVXNlIGdyZXAgLUUsIGZvciBhIG1vcmUgcmVhZGFibGUgcmVn ZXhwLgotLS0KIGNmZy5tayB8IDQgKystLQogMSBmaWxlIGNoYW5nZWQsIDIgaW5zZXJ0aW9ucygr KSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9jZmcubWsgYi9jZmcubWsKaW5kZXggMDFi YzQyYzdjLi5kZTE5OGQ5OTIgMTAwNjQ0Ci0tLSBhL2NmZy5taworKysgYi9jZmcubWsKQEAgLTE3 NSw3ICsxNzUsNyBAQCBzY19zeXN0ZW1faF9oZWFkZXJzOiAucmUtbGlzdAogCSAgdHJhcCAncmM9 JCQ/OyBybSAtZiAucmUtbGlzdDsgZXhpdCAkJHJjJyAwOwkJCVwKIAkgICQoZ2xfdHJhcF8pOwkJ CQkJCQlcCiAJICBncmVwIC1uRSAtZiAucmUtbGlzdAkJCQkJCVwKLQkgICAgICAkJCgkKFZDX0xJ U1RfRVhDRVBUKSB8IGdyZXAgJ15cKCQoc3JjZGlyKS9cKVw/c3JjLycpCVwKKwkgICAgICAkJCgk KFZDX0xJU1RfRVhDRVBUKSB8IGdyZXAgLUUgJ14oJChzcmNkaXIpLyk/c3JjLycpCVwKIAkgICAg JiYgeyBlY2hvICckKE1FKTogdGhlIGFib3ZlIGFyZSBhbHJlYWR5IGluY2x1ZGVkIHZpYSBzeXN0 ZW0uaCdcCiAJCSAgMT4mMjsgIGV4aXQgMTsgfSB8fCA6OwkJCQlcCiAJZmkKQEAgLTgzOCw3ICs4 MzgsNyBAQCBleGNsdWRlX2ZpbGVfbmFtZV9yZWdleHAtLXNjX2JpbmR0ZXh0ZG9tYWluID0gXAog ZXhjbHVkZV9maWxlX25hbWVfcmVnZXhwLS1zY190cmFpbGluZ19ibGFuayA9IFwKICAgXih0ZXN0 cy9wci98Z2wvLipcLmRpZmYkJHxtYW4vaGVscDJtYW4pCiBleGNsdWRlX2ZpbGVfbmFtZV9yZWdl eHAtLXNjX3N5c3RlbV9oX2hlYWRlcnMgPSBcCi0gIF5zcmMvKChkaWV8c3lzdGVtfGNvcHkpXC5o fG1ha2UtcHJpbWUtbGlzdFwuYykkJAorICBec3JjLygoZGllfHN5c3RlbXxjb3B5fGZpbmQtbW91 bnQtcG9pbnQpXC5ofG1ha2UtcHJpbWUtbGlzdFwuYykkJAoKIF9zcmMgPSAoZmFsc2V8bGJyYWNr ZXR8bHMtKGRpcnxsc3x2ZGlyKXx0YWMtcGlwZXx1bmFtZS0oYXJjaHx1bmFtZSkpCiBfZ2xfc3Jj ID0gKHhkZWN0by5tYXh8Y2wtc3RydG9sZCkKLS0gCjIuMzMuMAoK --000000000000781f0005ca5e2cf4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 10:37:28 2021 Received: (at 50167) by debbugs.gnu.org; 25 Aug 2021 14:37:28 +0000 Received: from localhost ([127.0.0.1]:47282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIu1w-0005kE-6h for submit@debbugs.gnu.org; Wed, 25 Aug 2021 10:37:28 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:47575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIu1u-0005k1-2E for 50167@debbugs.gnu.org; Wed, 25 Aug 2021 10:37:27 -0400 Received: from [192.168.101.10] ([91.12.164.105]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4bd0-1mHFbC2dxm-001kwm; Wed, 25 Aug 2021 16:37:04 +0200 Subject: Re: bug#50167: fixes for "fmt - -" etc. To: Jim Meyering , Paul Eggert References: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> <27106b86-66ee-909e-2700-2ba50e0175aa@cs.ucla.edu> From: Bernhard Voelker Message-ID: <3af38ac9-96f7-5f0e-4616-e1422600c4f5@bernhard-voelker.de> Date: Wed, 25 Aug 2021 16:37:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:9npiTpTyIas6A9Ne8p6y03onncTHkwjPQvcf003STavnq9zu7Kg EoeeJ4PXePidEvPKLogFw/o9dBs6X2A7F0Wjj8ibirifhvhkH7UfxhDXfEzeMBbbcwFEqlr TIXSWpGGPVJOapUNiIudKOzsaq2HI3Xgw1WNe2d/UWdHJxMvV236DqPxFUIOkyIix8piMQI xOt1ruJd1uo1Cr1TFJRqQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:807rlHUV9Zg=:mvrxpoimoWbbci5u68NKzk bKRzSUB1zED1L2Gm7rgj2IO8qmLMnkTxctJWrcPLuCSjdfvJ4A61QIi+5fSBZt9EpzRKVRDNC htDKA3NvgVUd44H2CyMzGfaWDOnHEGIb3itQlX9Ez1JVI0+ofXBpQWJVX1BiiEczhTPdkiWNu NjPRrMFF/PRlHEiK+W97VJAm6KceRAeekE3XvFt9FdT7r+jbdyIjj1LeaC9l0Mea6ALzwltYx oym3zOGKSXCJXrWzLgxoZaBYLwL0Pi8ZHIbKKZi3efqsis6eRc3HYZ7vz4g1zVQtKgrViPamz 8Gf2Aw98nDBbJ8ntfg3jBHiQlAMWgY1mlqstWWdXjbOyqlywRzRc4ulXyVQTlXj63bw60zAaT y2PpyUQQTv8Cnc/huMxDJyLykzHXsAo6KzD8NXYXJRbbzVUmts9I4BqsaiNSUPKc2uRqmjJah zYMfFArc6o2m85hrNSIHxaXBWzCn42kPSWUyBGa2sO8pBw52cwyIEsV09Co1QE/iwkJiDr55c ZLErRTGlVN8T4Hrjuzz+gEeYJEBkvNmJfSr0hMhjcLQ0omipEVj5nwovgbmqC6bxP41lfxJJA syyGiB6AuhvEhboz82ssJ9IG82RBFUe63I3hnFS1T3LOSbPKe0F/IXDVFh5+yarL8D1FgXYvb ssVKjCYHjA540LJh9rodH1KUinCjW1BMCTIIJpc/7hNnuzfoB73BreAEkPMgl9oD/ecc9ngZ+ DxAh2nKOXql9czJXxUvVmHgzgoZNgzOljlMs2Ybk54wOx0TWbA6yKC/unNU= X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 50167 Cc: 50167@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 8/25/21 10:38 AM, Jim Meyering wrote: > * cfg.mk (exclude_file_name_regexp--sc_system_h_headers): > Add find-mount-point.h to the regexp. +1 even better, thanks. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 15:46:55 2021 Received: (at 50167) by debbugs.gnu.org; 25 Aug 2021 19:46:55 +0000 Received: from localhost ([127.0.0.1]:47915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIyrK-0007Zb-S1 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 15:46:55 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:33739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIyrE-0007ZK-P3 for 50167@debbugs.gnu.org; Wed, 25 Aug 2021 15:46:49 -0400 Received: by mail-wr1-f50.google.com with SMTP id d26so1148931wrc.0 for <50167@debbugs.gnu.org>; Wed, 25 Aug 2021 12:46:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/sXdBucFSCzTkuBcjnoSaTh0O007l1S2S9+ynVqS46o=; b=gjoSyMYiiVyCmqDgVEOb7vkRqAvcGOrbSUE6moSm9NSy9/vAjf6XqTpK9eDzxZkf/i /QYD7uViNX4kEmUEQjgVHp1pVQX2bGBEQPAIXVKTfRcRB1Xdz3X7Xd4RJvD5sQclNnOi 3XwQjAt4dATIvhsUbn+TxsFn2xqOX+DCXaJ2w1coJXQCBi3NATCfzhm5tNCcTw82bfEU Y7yLUvEyL5cqQdep7W834Jl6013eAUEJT7I3Ek8I4d9TEdi4u2z5zMf8pBLfPgSVBNjV llsx1dc3UjYEET4BisUsISdN0nXk5Tyf/LxLcO/LsdemzmKibrk4sYM5LLUZqOxfEOyU j2MQ== X-Gm-Message-State: AOAM533PK6IN13aHr8QtSMNF10vG/HkmaRRKnnjZXHaDodGAVL3QIboz tXw3SBA01+i905jMHbM6oy42CRDJgLrL0BOIDyY= X-Google-Smtp-Source: ABdhPJwy/wc6WTmvd4GlkxwkS+Sbu6W+XvSu0H0YDj18KzodmjVBCkzebrJYJ40EJxjh68/G4NoNhlpD9kokleF+xtw= X-Received: by 2002:a05:6000:1569:: with SMTP id 9mr8757742wrz.343.1629920798883; Wed, 25 Aug 2021 12:46:38 -0700 (PDT) MIME-Version: 1.0 References: <1410952c-fa43-3bd8-4204-a292753f9e70@bernhard-voelker.de> <27106b86-66ee-909e-2700-2ba50e0175aa@cs.ucla.edu> <3af38ac9-96f7-5f0e-4616-e1422600c4f5@bernhard-voelker.de> In-Reply-To: <3af38ac9-96f7-5f0e-4616-e1422600c4f5@bernhard-voelker.de> From: Jim Meyering Date: Wed, 25 Aug 2021 21:46:26 +0200 Message-ID: Subject: Re: bug#50167: fixes for "fmt - -" etc. To: Bernhard Voelker Content-Type: multipart/alternative; boundary="0000000000003ac4a005ca67824f" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 50167 Cc: Paul Eggert , 50167@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --0000000000003ac4a005ca67824f Content-Type: text/plain; charset="UTF-8" On Wed, Aug 25, 2021, 4:37 PM Bernhard Voelker wrote: > On 8/25/21 10:38 AM, Jim Meyering wrote: > > * cfg.mk (exclude_file_name_regexp--sc_system_h_headers): > > Add find-mount-point.h to the regexp. > > +1 > even better, thanks. > Thanks. Pushed. > --0000000000003ac4a005ca67824f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 25, 2021, 4:37 PM Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 8/25/21 10:38 AM, Jim Meyering wro= te:
> * cfg.mk (exclude_file_name_regexp--sc_system_h_headers):
> Add find-mount-point.h to the regexp.

+1
even better, thanks.

Thanks. Pushed.
--0000000000003ac4a005ca67824f-- From unknown Sat Aug 09 13:07:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Sep 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator