-static struct svdir svd[2];
-static smallint sigterm;
-static smallint haslog;
-static smallint pidchanged = 1;
-static int logpipe[2];
-static char *dir;
+struct globals {
+ smallint haslog;
+ smallint sigterm;
+ smallint pidchanged;
+ struct fd_pair selfpipe;
+ struct fd_pair logpipe;
+ char *dir;
+ struct svdir svd[2];
+};
+#define G (*(struct globals*)&bb_common_bufsiz1)
+#define haslog (G.haslog )
+#define sigterm (G.sigterm )
+#define pidchanged (G.pidchanged )
+#define selfpipe (G.selfpipe )
+#define logpipe (G.logpipe )
+#define dir (G.dir )
+#define svd (G.svd )
+#define INIT_G() do { \
+ pidchanged = 1; \
+} while (0)