aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-31 13:31:19 -0500
committerRob Landley <rob@landley.net>2007-01-31 13:31:19 -0500
commita6d696b74adb08d83b21f8299b5443f31a5f43ec (patch)
tree7eb1f2bf89802f540f805b54c3d0f07f7fb29c26 /toys
parent00569d66369f9cf4e2770342511372f947cd047d (diff)
downloadtoybox-a6d696b74adb08d83b21f8299b5443f31a5f43ec.tar.gz
Small cleanup to prepare for cross-compile friendly make install.
Diffstat (limited to 'toys')
-rw-r--r--toys/toylist.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/toys/toylist.h b/toys/toylist.h
index 6914f4ee..d6b9866c 100644
--- a/toys/toylist.h
+++ b/toys/toylist.h
@@ -5,18 +5,10 @@
*/
-// When #included from main.c, provide the guts for toy_list[]
+// Provide function declarations and structs. Note that main.c #includes this
+// file twice (with different macros) to populate toy_list[].
-#ifdef FROM_MAIN
-#undef NEWTOY
-#undef OLDTOY
-#define NEWTOY(name, opts, flags) {#name, name##_main, opts, flags},
-#define OLDTOY(name, oldname, opts, flags) {#name, oldname##_main, opts, flags},
-
-// When #included from toys.h, provide function declarations and structs.
-// The #else is because main.c #includes this file twice.
-
-#else
+#ifndef NEWTOY
#define NEWTOY(name, opts, flags) int name##_main(void);
#define OLDTOY(name, oldname, opts, flags)