bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] for --enable-minimal-config


From: istry
Subject: [PATCH] for --enable-minimal-config
Date: Mon, 09 Sep 2002 22:32:56 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H   -I.  -I/mnt/hde10/_build_/src/bash -I/mnt/hde10/_build_/src/bash/include -I/mnt/hde10/_build_/src/bash/lib -g -O2
uname output: Linux lfs 2.4.18acl #5 Sat Sep 7 22:16:04 MSD 2002 i686 unknown
Machine Type: i686-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
    i used to build a minimal static sh for root resque tasks. after update to v 2.05b i am unable to do it off the box anymore. the problem is that some fields in the COMMAND structure undef'ed in that case while executing_line_number() still uses them unconditionally.

Repeat-By:
    CFLAGS="-Os" ./configure --enable-minimal-shell && make

Fix:
    wrap lines in question with defines (tiny patch attached)

diff -Nur bash-2.05b.orig/execute_cmd.c bash-2.05b/execute_cmd.c
--- bash-2.05b.orig/execute_cmd.c       Mon Mar 18 21:24:22 2002
+++ bash-2.05b/execute_cmd.c    Mon Sep  9 21:44:38 2002
@@ -286,12 +290,18 @@
     {
       if (currently_executing_command->type == cm_simple)
        return currently_executing_command->value.Simple->line;
+#if defined (COND_COMMAND)
       else if (currently_executing_command->type == cm_cond)
        return currently_executing_command->value.Cond->line;
+#endif
+#if defined (DPAREN_ARITHMETIC)
       else if (currently_executing_command->type == cm_arith)
        return currently_executing_command->value.Arith->line;
+#endif
+#if defined (ARITH_FOR_COMMAND)
       else if (currently_executing_command->type == cm_arith_for)
        return currently_executing_command->value.ArithFor->line;
+#endif
       else
        return line_number;
     }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]