live-bootstrap/steps/bison-3.4.1/patches/fseterr.patch
fosslinux a67db8fcbd Make patches relative to where tarballs are extracted
Ever since an old patch version, it has (for reasonable security
reasons) not supported patched with ../ in the filename.
Many of our patches have been relying on this behaviour being OK,
because we start off with an ancient patch version that didn't perform
such checks. As soon as we need this behaviour after we build a newer
patch though, we will have problems.

So, let's change the policy.
Patches are relative to where tarballs are extracted, rather than the
"working directory" - e.g. have patches for `coreutils-9.4/src/cp.c`
instead of `src/cp.c`.
Keeping this consistent has a few implications;
- patches are applied from the build/ directory in bash era now, with
  `-p0`
- when patches are manually applied in the bash era, use `-p` as
  required, usually `-p1`
- in kaem era where patches are always manually applied, `-p1` is used
2024-12-23 15:20:42 +11:00

23 lines
853 B
Diff

SPDX-FileCopyrightText: 2020 Giovanni Mascellani <gio@debian.org>
SPDX-License-Identifier: GPL-3.0-or-later
commit b1127f6821cc9c40c5a9ee406bee7564c549d9a3
Author: Giovanni Mascellani <gio@debian.org>
Date: Thu Mar 26 18:02:01 2020 +0100
Compile bison.
diff --git lib/fseterr.c lib/fseterr.c
index 8cd68e8..0ec7e2c 100644
--- bison-3.4.1/lib/fseterr.c
+++ bison-3.4.1/lib/fseterr.c
@@ -53,7 +53,7 @@ fseterr (FILE *fp)
#elif defined EPLAN9 /* Plan9 */
if (fp->state != 0 /* CLOSED */)
fp->state = 5 /* ERR */;
-#elif 0 /* unknown */
+#elif 1 /* unknown */
/* Portable fallback, based on an idea by Rich Felker.
Wow! 6 system calls for something that is just a bit operation!
Not activated on any system, because there is no way to repair FP when