REORG: vars: move the "proc" scope variables out of the global struct
The presence of this field causes a long dependency chain because almost
everyone includes global-t.h, and vars include sample_data which include
some system includes as well as HTTP parts.
There is absolutely no reason for having the process-wide variables in
the global struct, let's just move them into vars.c and vars.h. This
reduces from ~190k to ~170k the preprocessed output of version.c.
diff --git a/src/haproxy.c b/src/haproxy.c
index 76fe08c..3de53bf 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1521,7 +1521,7 @@
hlua_init();
/* Initialize process vars */
- vars_init(&global.vars, SCOPE_PROC);
+ vars_init(&proc_vars, SCOPE_PROC);
global.tune.options |= GTUNE_USE_SELECT; /* select() is always available */
#if defined(USE_POLL)
@@ -2553,7 +2553,7 @@
free(tff);
}
- vars_prune(&global.vars, NULL, NULL);
+ vars_prune(&proc_vars, NULL, NULL);
pool_destroy_all();
deinit_pollers();
} /* end deinit() */