diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-22 00:08:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-22 00:08:27 +0000 |
commit | 5d89fbaa2e00a8a26e530306d76b78bf91d12ec8 (patch) | |
tree | 44d54f6dfbd0f6270fb0b1aba0195bc53db8bef4 /coreutils/test.c | |
parent | 9137341851f3ab89f5c6a54a6baff68f0f4a5e17 (diff) | |
download | busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.tar.gz busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.tar.bz2 busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.zip |
*: remove remaining instances of ".data" hack
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index 2f5b6b8a1..3c725a245 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -159,7 +159,7 @@ typedef int arith_t; | |||
159 | 159 | ||
160 | 160 | ||
161 | /* We try to minimize both static and stack usage. */ | 161 | /* We try to minimize both static and stack usage. */ |
162 | struct statics { | 162 | struct test_statics { |
163 | char **t_wp; | 163 | char **t_wp; |
164 | const struct t_op *t_wp_op; | 164 | const struct t_op *t_wp_op; |
165 | gid_t *group_array; | 165 | gid_t *group_array; |
@@ -167,11 +167,10 @@ struct statics { | |||
167 | jmp_buf leaving; | 167 | jmp_buf leaving; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | /* Make it reside in writable memory, yet make compiler understand | 170 | /* See test_ptr_hack.c */ |
171 | * that it is not going to change. */ | 171 | extern struct test_statics *const test_ptr_to_statics; |
172 | static struct statics *const ptr_to_statics __attribute__ ((section (".data"))); | ||
173 | 172 | ||
174 | #define S (*ptr_to_statics) | 173 | #define S (*test_ptr_to_statics) |
175 | #define t_wp (S.t_wp ) | 174 | #define t_wp (S.t_wp ) |
176 | #define t_wp_op (S.t_wp_op ) | 175 | #define t_wp_op (S.t_wp_op ) |
177 | #define group_array (S.group_array ) | 176 | #define group_array (S.group_array ) |
@@ -179,11 +178,11 @@ static struct statics *const ptr_to_statics __attribute__ ((section (".data"))); | |||
179 | #define leaving (S.leaving ) | 178 | #define leaving (S.leaving ) |
180 | 179 | ||
181 | #define INIT_S() do { \ | 180 | #define INIT_S() do { \ |
182 | (*(struct statics**)&ptr_to_statics) = xzalloc(sizeof(S)); \ | 181 | (*(struct test_statics**)&test_ptr_to_statics) = xzalloc(sizeof(S)); \ |
183 | barrier(); \ | 182 | barrier(); \ |
184 | } while (0) | 183 | } while (0) |
185 | #define DEINIT_S() do { \ | 184 | #define DEINIT_S() do { \ |
186 | free(ptr_to_statics); \ | 185 | free(test_ptr_to_statics); \ |
187 | } while (0) | 186 | } while (0) |
188 | 187 | ||
189 | static arith_t primary(enum token n); | 188 | static arith_t primary(enum token n); |