Compare commits
4 Commits
Author | SHA256 | Date | |
---|---|---|---|
|
137593000d | ||
e2d1dcb647 | |||
|
9740f8f158 | ||
|
a296bffe53 |
@ -1541,12 +1541,13 @@ Index: coreutils-9.5/src/fold.c
|
||||
|
||||
- saved_errno = errno;
|
||||
+ *saved_errno = errno;
|
||||
+ if (!ferror (istream))
|
||||
if (!ferror (istream))
|
||||
- saved_errno = 0;
|
||||
+ *saved_errno = 0;
|
||||
+
|
||||
+ if (offset_out)
|
||||
+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||
+
|
||||
|
||||
if (offset_out)
|
||||
fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||
|
||||
+}
|
||||
+
|
||||
+#if HAVE_MBRTOWC
|
||||
@ -1718,19 +1719,18 @@ Index: coreutils-9.5/src/fold.c
|
||||
+ }
|
||||
+
|
||||
+ *saved_errno = errno;
|
||||
if (!ferror (istream))
|
||||
- saved_errno = 0;
|
||||
+ if (!ferror (istream))
|
||||
+ *saved_errno = 0;
|
||||
|
||||
if (offset_out)
|
||||
fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||
|
||||
+
|
||||
+ if (offset_out)
|
||||
+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||
+
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/* Fold file FILENAME, or standard input if FILENAME is "-",
|
||||
+ to stdout, with maximum line length WIDTH.
|
||||
+ Return 0 if successful, 1 if an error occurs. */
|
||||
+ Return true if successful. */
|
||||
+
|
||||
+static bool
|
||||
+fold_file (char const *filename, size_t width)
|
||||
@ -1741,15 +1741,15 @@ Index: coreutils-9.5/src/fold.c
|
||||
+ if (STREQ (filename, "-"))
|
||||
+ {
|
||||
+ istream = stdin;
|
||||
+ have_read_stdin = 1;
|
||||
+ have_read_stdin = true;
|
||||
+ }
|
||||
+ else
|
||||
+ istream = fopen (filename, "r");
|
||||
+
|
||||
+ if (istream == NULL)
|
||||
+ if (istream == nullptr)
|
||||
+ {
|
||||
+ error (0, errno, "%s", filename);
|
||||
+ return 1;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* Define how ISTREAM is being folded. */
|
||||
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 19 07:57:52 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- Avoid empty scriptlets
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 9 20:22:23 UTC 2024 - Bernhard Voelker <mail@bernhard-voelker.de>
|
||||
|
||||
- coreutils-i18n.patch: fold(1): fix exit code for non-existent file.
|
||||
The exit code of fold(1) was zero for non-existent file:
|
||||
$ fold badfile; echo $?
|
||||
fold: badfile: No such file or directory
|
||||
0
|
||||
The bug was introduced by the downstrean I18N patch. (rhbz#2296201)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 1 18:07:16 UTC 2024 - Bernhard Voelker <mail@bernhard-voelker.de>
|
||||
|
||||
|
@ -239,18 +239,19 @@ install src/{pinky,uptime,users,who} %{buildroot}%{_bindir}/
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%post
|
||||
%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single"
|
||||
%post
|
||||
%{?regenerate_initrd_post}
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%posttrans
|
||||
%dnl ================================================
|
||||
%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single"
|
||||
%posttrans
|
||||
%{?regenerate_initrd_posttrans}
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%dnl ================================================
|
||||
|
||||
%files
|
||||
%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user