coreutils: update to 9.4

patches were copied from CygWin.
This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2023-09-19 19:36:52 +01:00
parent 225c968276
commit ddf66eac75
32 changed files with 1184 additions and 1143 deletions

View File

@@ -0,0 +1,18 @@
--- origsrc/lib/freopen.c 2020-01-01 07:14:23.000000000 -0700
+++ src/lib/freopen.c 2022-04-16 22:41:38.090786400 -0600
@@ -59,6 +59,15 @@ rpl_freopen (const char *filename, const
errno = 0;
#endif
+#if __CYGWIN__
+ if (!filename && !strcmp (mode, "wb"))
+ {
+ int flag = fcntl (fileno (stream), F_GETFL);
+ if (0 <= flag && (flag & O_APPEND))
+ mode = "ab";
+ }
+
+#endif
result = orig_freopen (filename, mode, stream);
if (!result)