aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/more.c2
-rw-r--r--util-linux/script.c2
5 files changed, 4 insertions, 6 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index c98a74fc0..827ea21f3 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -309,7 +309,7 @@ struct globals {
309#define MBRbuffer (G.MBRbuffer) 309#define MBRbuffer (G.MBRbuffer)
310#define ptes (G.ptes) 310#define ptes (G.ptes)
311#define INIT_G() do { \ 311#define INIT_G() do { \
312 PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ 312 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
313 sector_size = DEFAULT_SECTOR_SIZE; \ 313 sector_size = DEFAULT_SECTOR_SIZE; \
314 sector_offset = 1; \ 314 sector_offset = 1; \
315 g_partitions = 4; \ 315 g_partitions = 4; \
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index deb82f75b..62e4f08b6 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -190,7 +190,7 @@ struct globals {
190#define check_file_blk (G.check_file_blk ) 190#define check_file_blk (G.check_file_blk )
191#define current_name (G.current_name ) 191#define current_name (G.current_name )
192#define INIT_G() do { \ 192#define INIT_G() do { \
193 PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ 193 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
194 dirsize = 16; \ 194 dirsize = 16; \
195 namelen = 14; \ 195 namelen = 14; \
196 current_name[0] = '/'; \ 196 current_name[0] = '/'; \
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 118b95efb..a784b72f4 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -122,7 +122,7 @@ struct globals {
122}; 122};
123#define G (*ptr_to_globals) 123#define G (*ptr_to_globals)
124#define INIT_G() do { \ 124#define INIT_G() do { \
125 PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ 125 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
126} while (0) 126} while (0)
127 127
128static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n) 128static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n)
diff --git a/util-linux/more.c b/util-linux/more.c
index eeeea509e..2d5535991 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -28,9 +28,7 @@ struct globals {
28 struct termios new_settings; 28 struct termios new_settings;
29}; 29};
30#define G (*(struct globals*)bb_common_bufsiz1) 30#define G (*(struct globals*)bb_common_bufsiz1)
31//#define G (*ptr_to_globals)
32#define INIT_G() ((void)0) 31#define INIT_G() ((void)0)
33//#define INIT_G() PTR_TO_GLOBALS = xzalloc(sizeof(G))
34#define initial_settings (G.initial_settings) 32#define initial_settings (G.initial_settings)
35#define new_settings (G.new_settings ) 33#define new_settings (G.new_settings )
36#define cin_fileno (G.cin_fileno ) 34#define cin_fileno (G.cin_fileno )
diff --git a/util-linux/script.c b/util-linux/script.c
index fda726ed9..e6dbb1aa2 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -25,7 +25,7 @@ struct globals {
25#define tt (G.tt ) 25#define tt (G.tt )
26#define fname (G.fname ) 26#define fname (G.fname )
27#define INIT_G() do { \ 27#define INIT_G() do { \
28 PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ 28 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
29 fname = "typescript"; \ 29 fname = "typescript"; \
30} while (0) 30} while (0)
31 31