I'm trying to figure out how to build ash with the DEBUG macro set to 1 or
2. I get linking errors:
shell/lib.a(ash.o): In function `main':
ash.c:(.text+0x11623): multiple definition of `main'
libbb/lib.a(appletlib.o):appletlib.c:(.text+0x30d): first defined here
collect2: ld returned 1 exit status
Didn't dig. What's the magic Denis?
Index: shell/ash.c
===================================================================
--- shell/ash.c (revision 20939)
+++ shell/ash.c (working copy)
@@ -51,8 +51,10 @@
#endif
#if DEBUG
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#endif
#include "busybox.h" /* for applet_names */
#include <paths.h>
#include <setjmp.h>
@@ -6500,7 +6502,7 @@
/* unsigned flags; */
};
#define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1)
-/* "regular" bltins always take precedence over commands,
+/* "regular" builtins always take precedence over commands,
* regardless of PATH=....%builtin... position */
#define IS_BUILTIN_REGULAR(b) ((b)->name[0] & 2)
#define IS_BUILTIN_ASSIGN(b) ((b)->name[0] & 4)
Cheers,
--
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox