[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
conditional compilation needed
From: |
Ian Zimmerman |
Subject: |
conditional compilation needed |
Date: |
Wed, 15 Jan 2003 15:03:38 -0800 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
uname output: Linux kronstadt 2.4.20 #1 Wed Jan 15 10:48:55 PST 2003 i586
unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
At line 209 of execute_cmd.c is this code:
if (currently_executing_command->type == cm_simple)
return currently_executing_command->value.Simple->line;
else if (currently_executing_command->type == cm_cond)
return currently_executing_command->value.Cond->line;
else if (currently_executing_command->type == cm_arith)
return currently_executing_command->value.Arith->line;
else if (currently_executing_command->type == cm_arith_for)
return currently_executing_command->value.ArithFor->line;
else
return line_number;
but the Cond, Arith, and ArithFor members are undefined if the
respective feechures are configured out.
Fix:
Add conditionals like this:
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- conditional compilation needed,
Ian Zimmerman <=