Remove some dead macros.
Move others that are only used in one file, out of core.h into that file.
Remove the "VG_" prefixes while doing it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3337 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 77ee6be..b81ba75 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -80,6 +80,13 @@
/* Proportion of client space for its heap (rest is for mmaps + stack) */
#define CLIENT_HEAP_PROPORTION 0.333
+/* Number of file descriptors that Valgrind tries to reserve for
+ it's own use - just a small constant. */
+#define N_RESERVED_FDS (10)
+
+/* Default debugger command. */
+#define CLO_DEFAULT_DBCOMMAND GDB_PATH " -nw %f %p"
+
/*====================================================================*/
/*=== Global entities not referenced from generated code ===*/
/*====================================================================*/
@@ -1408,7 +1415,7 @@
VexControl VG_(clo_vex_control);
Bool VG_(clo_error_limit) = True;
Bool VG_(clo_db_attach) = False;
-Char* VG_(clo_db_command) = VG_CLO_DEFAULT_DBCOMMAND;
+Char* VG_(clo_db_command) = CLO_DEFAULT_DBCOMMAND;
Int VG_(clo_gen_suppressions) = 0;
Int VG_(clo_sanity_level) = 1;
Int VG_(clo_verbosity) = 1;
@@ -2145,15 +2152,15 @@
}
/* Work out where to move the soft limit to. */
- if (rl.rlim_cur + VG_N_RESERVED_FDS <= rl.rlim_max) {
- rl.rlim_cur = rl.rlim_cur + VG_N_RESERVED_FDS;
+ if (rl.rlim_cur + N_RESERVED_FDS <= rl.rlim_max) {
+ rl.rlim_cur = rl.rlim_cur + N_RESERVED_FDS;
} else {
rl.rlim_cur = rl.rlim_max;
}
/* Reserve some file descriptors for our use. */
- VG_(fd_soft_limit) = rl.rlim_cur - VG_N_RESERVED_FDS;
- VG_(fd_hard_limit) = rl.rlim_cur - VG_N_RESERVED_FDS;
+ VG_(fd_soft_limit) = rl.rlim_cur - N_RESERVED_FDS;
+ VG_(fd_hard_limit) = rl.rlim_cur - N_RESERVED_FDS;
/* Update the soft limit. */
VG_(setrlimit)(VKI_RLIMIT_NOFILE, &rl);