[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug on parse.y (alias_t not defined)
From: |
Anderson Lizardo |
Subject: |
Possible bug on parse.y (alias_t not defined) |
Date: |
Mon, 8 Mar 2004 18:05:00 -0400 |
User-agent: |
Mutt/1.4.2.1i |
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. -I./include -I./lib -g -O2
uname output: Linux anderson 2.4.25 #1 Thu Feb 26 18:54:27 AMT 2004 i686
GenuineIntel unknown GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
parse.y has this code snippet at line 155:
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
static void push_string __P((char *, int, alias_t *));
static void pop_string __P((void));
static void free_string_list __P((void));
#endif
A package compiled with dparen-arithmetic but not with alias will fail to
build due to "alias_t" struct not being defined. Earlier on line 1405,
this struct is defined this way:
#if !defined (ALIAS)
typedef void *alias_t;
#endif
So a simple fix is to move this conditional to somewhere before it being
first used (that is, before line 155).
Repeat-By:
Compile bash with these commands:
./configure --disable-alias && make
Fix:
--- bash-2.05b.orig/parse.y 2002-05-21 15:57:30.000000000 +0000
+++ bash-2.05b/parse.y 2004-02-29 03:01:24.000000000 +0000
@@ -152,6 +152,9 @@
static void discard_until __P((int));
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+#if !defined (ALIAS)
+typedef void *alias_t;
+#endif
static void push_string __P((char *, int, alias_t *));
static void pop_string __P((void));
static void free_string_list __P((void));
@@ -1399,10 +1402,6 @@
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
-#if !defined (ALIAS)
-typedef void *alias_t;
-#endif
-
#define END_OF_ALIAS 0
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Possible bug on parse.y (alias_t not defined),
Anderson Lizardo <=