live-bootstrap/steps/bash-2.05b/patches/missing-defines.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

29 lines
1 KiB
Diff

SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
We don't actually want any of these things, which should really be hidden
behind the ifdefs given here to disable them when they are not being
used (as we do).
--- bash-2.05b/execute_cmd.c 2021-01-15 09:38:55.730307635 +1100
+++ bash-2.05b/execute_cmd.c 2021-01-15 09:43:41.046896754 +1100
@@ -286,12 +286,18 @@
{
if (currently_executing_command->type == cm_simple)
return currently_executing_command->value.Simple->line;
+#ifdef COND_COMMAND
else if (currently_executing_command->type == cm_cond)
return currently_executing_command->value.Cond->line;
+#endif
+#ifdef DPAREN_ARITHMETIC
else if (currently_executing_command->type == cm_arith)
return currently_executing_command->value.Arith->line;
+#endif
+#ifdef ARITH_FOR_COMMAND
else if (currently_executing_command->type == cm_arith_for)
return currently_executing_command->value.ArithFor->line;
+#endif
else
return line_number;
}