[BusyBox] 0.52 and ash: problems on 2 systems

Aaron Lehmann aaronl at vitelus.com
Sat Jul 7 12:47:31 UTC 2001


On Sat, Jul 07, 2001 at 08:32:04PM +0200, Giulio Orsero wrote:
> 1)
> linux, glibc-2.1.2-11, 2.2.19
> 
> gcc -I- -Wall -Wshadow -Os -fomit-frame-pointer -D_GNU_SOURCE  -DBB_VER='"0.52"'
>  -DBB_BT='"2001.07.07-18:23+0000"' -DUSE_SYSTEM_PWD_GRP  -I.  -c sh.c -o sh.o
> In file included from sh.c:33:
> ash.c:1673: `true_main' undeclared here (not in a function)
> ash.c:1673: initializer element for `builtincmds[1].builtinfunc' is not constant
> make: *** [sh.o] Error 1

Try defining ASH_BBAPPS_AS_BUILTINS

> 2)
> linux, libc-5.4.38-5, 2.0.33
> 
> gcc -I- -Wall -Wshadow -O2 -fomit-frame-pointer -D_GNU_SOURCE  -DBB_VER='"0.52"'
>  -DBB_BT='"2001.07.07-18:26+0000"' -DUSE_SYSTEM_PWD_GRP  -I.  -c sh.c -o sh.o
> In file included from sh.c:33:
> ash.c:108: stdbool.h: No such file or directory
> In file included from sh.c:33:
> ash.c:266: warning: `setjmp' redefined
> /usr/include/setjmp.h:98: warning: this is the location of the previous
> definition
> make: *** [sh.o] Error 1

You can replace that #include with typedef char bool;, or something of
the sort.


> after copying stdbool.h from the glibc system:
> -DBB_BT='"2001.07.07-18:27+0000"' -DUSE_SYSTEM_PWD_GRP  -I.  -c sh.c -o sh.o
> In file included from sh.c:33:
> ash.c: In function `ulimitcmd':
> ash.c:8563: `rlim_t' undeclared (first use this function)
> ash.c:8563: (Each undeclared identifier is reported only once
> ash.c:8563: for each function it appears in.)

Seems there's a misplaced endif. Erik:

Index: ash.c
===================================================================
RCS file: /var/cvs/busybox/ash.c,v
retrieving revision 1.7
diff -u -r1.7 ash.c
--- ash.c	2001/07/07 00:05:55	1.7
+++ ash.c	2001/07/07 18:46:19
@@ -263,6 +263,14 @@
  */
 
 #if !defined(__GLIBC__)
+/* Prevent a compiler warning */
+#ifdef setjmp
+#undef setjmp
+#endif
+#ifdef longjmp
+#undef longjmp
+#endif
+
 #define setjmp(jmploc)  _setjmp(jmploc)
 #define longjmp(jmploc, val)    _longjmp(jmploc, val)
 #endif
@@ -8317,10 +8325,10 @@
 #ifdef __GLIBC__
 static mode_t getmode(const void *, mode_t);
 static void *setmode(const char *);
+#endif
 
 #if !defined(__GLIBC__) || __GLIBC__ == 2 && __GLIBC_MINOR__ < 1
 typedef enum __rlimit_resource rlim_t;
-#endif
 #endif
 
 

> ash.c: In function `setmode':
> ash.c:11670: `S_ISTXT' undeclared (first use this function)
#define S_ISTXT S_ISVTX, maybe





More information about the busybox mailing list