[git commit] Rename INIT_LAST to INIT_FUNC to avoid confusion
Denys Vlasenko
vda.linux at googlemail.com
Mon Jun 30 14:26:57 UTC 2014
commit: http://git.busybox.net/busybox/commit/?id=bf0f2c7aa6ab5c33c05b4620a6bfa286bd38c9f9
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
We don't have an INIT_FIRST, so let's rename INIT_LAST to INIT_FUNC
to imply that the function is called at program start-up.
Also: the priority argument for __attribute__((constructor)) isn't
used, so let's remove it.
Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
include/libbb.h | 2 +-
include/platform.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/libbb.h b/include/libbb.h
index cede50c..858084b 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1960,7 +1960,7 @@ void bbunit_settestfailed(void);
.name = #NAME, \
.testfunc = bbunit_##NAME##_test, \
}; \
- static void INIT_LAST bbunit_##NAME##_register(void) \
+ static void INIT_FUNC bbunit_##NAME##_register(void) \
{ \
bbunit_registertest(&bbunit_##NAME##_elem); \
} \
diff --git a/include/platform.h b/include/platform.h
index 413c222..09c7ccd 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -76,8 +76,8 @@
# define UNUSED_PARAM_RESULT
#endif
-/* used by unit test machinery to run registration functions */
-#define INIT_LAST __attribute__ ((constructor(2000)))
+/* used by unit test machinery to run registration functions before calling main() */
+#define INIT_FUNC __attribute__ ((constructor))
/* -fwhole-program makes all symbols local. The attribute externally_visible
* forces a symbol global. */
More information about the busybox-cvs
mailing list