aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2014-06-26 14:31:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2014-06-30 16:26:57 +0200
commitbf0f2c7aa6ab5c33c05b4620a6bfa286bd38c9f9 (patch)
treecb71b1abc53092fb2ec99084d1e8946c8ada1639
parentd3633b7e9c5dae78343a8552f54b0efa61074380 (diff)
downloadbusybox-w32-bf0f2c7aa6ab5c33c05b4620a6bfa286bd38c9f9.tar.gz
busybox-w32-bf0f2c7aa6ab5c33c05b4620a6bfa286bd38c9f9.tar.bz2
busybox-w32-bf0f2c7aa6ab5c33c05b4620a6bfa286bd38c9f9.zip
Rename INIT_LAST to INIT_FUNC to avoid confusion
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@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h2
-rw-r--r--include/platform.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index cede50cc2..858084bc5 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1960,7 +1960,7 @@ void bbunit_settestfailed(void);
1960 .name = #NAME, \ 1960 .name = #NAME, \
1961 .testfunc = bbunit_##NAME##_test, \ 1961 .testfunc = bbunit_##NAME##_test, \
1962 }; \ 1962 }; \
1963 static void INIT_LAST bbunit_##NAME##_register(void) \ 1963 static void INIT_FUNC bbunit_##NAME##_register(void) \
1964 { \ 1964 { \
1965 bbunit_registertest(&bbunit_##NAME##_elem); \ 1965 bbunit_registertest(&bbunit_##NAME##_elem); \
1966 } \ 1966 } \
diff --git a/include/platform.h b/include/platform.h
index 413c2224c..09c7ccd9c 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -76,8 +76,8 @@
76# define UNUSED_PARAM_RESULT 76# define UNUSED_PARAM_RESULT
77#endif 77#endif
78 78
79/* used by unit test machinery to run registration functions */ 79/* used by unit test machinery to run registration functions before calling main() */
80#define INIT_LAST __attribute__ ((constructor(2000))) 80#define INIT_FUNC __attribute__ ((constructor))
81 81
82/* -fwhole-program makes all symbols local. The attribute externally_visible 82/* -fwhole-program makes all symbols local. The attribute externally_visible
83 * forces a symbol global. */ 83 * forces a symbol global. */