[BusyBox] WORKS! - but still and issue -- 1.00-pre2/pre3 - shell/ash.c Internal compilererror

David Douglas ddouglas at Crossroads.com
Mon Sep 15 11:24:45 MDT 2003


Ok,		

So now it builds, but I'm having another problem.  The shell does not
seem to be responding properly when I use this busybox.  With the 0.60.5
busybox the shell works OK and I can access the ramdisk.  However, with
the pre3 busybox, nothing echo's back when I type a command...  It just
acts like nothing is there.

Help?!

Thanks,
David


-----Original Message-----
From: Junio C Hamano [mailto:junkio at cox.net] 
Sent: Sunday, September 14, 2003 8:41 PM
To: Randy Chan; David Douglas
Subject: re: [Busybox] 1.00-pre2/pre3 - shell/ash.c Internal
compilererror

If you two have a chance, could you let me know if the patch I
posted to busybox list last week solves your problem?  I polled
three people who asked last month on the list about the ash
compilation problem due to older GCC bug, and have got one
positive reply.

My intention is to see if the patch, which should not change any
behaviour of the resulting code, works around the problem with
old compilers that had trouble with the 1.00-pre2 and 1.00-pre3
code as shipped, and if so, to push the change upstream.

Thanks in advance.

----------------------------------------------------------------
* Make ash compile under older GCC.

This patch moves structure declarations before their first use.
This solves, at least for me, "internal compiler error: in
int_mode_for_mode" problem people with older GCC have been
reporting since 1.00-pre2.  Please do not ask why this
essentially no-op change pleases the compiler; I do not know.


--- a/shell/ash.c	2003-09-01 19:36:17.000000000 -0700
+++ b/shell/ash.c	2003-09-12 10:40:21.000000000 -0700
@@ -550,6 +550,29 @@
 
 /* next character in input buffer */
 static char *parsenextc;                /* copy of parsefile->nextc */
+
+struct strpush {
+	struct strpush *prev;   /* preceding string on stack */
+	char *prevstring;
+	int prevnleft;
+#ifdef CONFIG_ASH_ALIAS
+	struct alias *ap;       /* if push was associated with an alias
*/
+#endif
+	char *string;           /* remember the string since it may
change */
+};
+
+struct parsefile {
+	struct parsefile *prev; /* preceding file on stack */
+	int linno;              /* current line */
+	int fd;                 /* file descriptor (or -1 if string) */
+	int nleft;              /* number of chars left in this line */
+	int lleft;              /* number of chars left in this buffer
*/
+	char *nextc;            /* next char in buffer */
+	char *buf;              /* input buffer */
+	struct strpush *strpush; /* for pushing strings at this level */
+	struct strpush basestrpush; /* so pushing one is fast */
+};
+
 static struct parsefile basepf;         /* top level input file */
 static char basebuf[IBUFSIZ];           /* buffer for top level input
file */
 static struct parsefile *parsefile = &basepf;  /* current input file */
@@ -1573,28 +1596,6 @@
 
 static int loopnest;            /* current loop nesting level */
 
-struct strpush {
-	struct strpush *prev;   /* preceding string on stack */
-	char *prevstring;
-	int prevnleft;
-#ifdef CONFIG_ASH_ALIAS
-	struct alias *ap;       /* if push was associated with an alias
*/
-#endif
-	char *string;           /* remember the string since it may
change */
-};
-
-struct parsefile {
-	struct parsefile *prev; /* preceding file on stack */
-	int linno;              /* current line */
-	int fd;                 /* file descriptor (or -1 if string) */
-	int nleft;              /* number of chars left in this line */
-	int lleft;              /* number of chars left in this buffer
*/
-	char *nextc;            /* next char in buffer */
-	char *buf;              /* input buffer */
-	struct strpush *strpush; /* for pushing strings at this level */
-	struct strpush basestrpush; /* so pushing one is fast */
-};
-
 /*
  * The parsefile structure pointed to by the global variable parsefile
  * contains information about the current file being read.





More information about the busybox mailing list