summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-12-06 10:08:11 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:52 +0200
commit9af9193b4680a5010e1f50e76abcfc463694ea6b (patch)
tree1aad9bf32c1c21e23593eef10b59626d4b8690d3 /dyn_load.c
parent16780405c899f01119bc45167122b4242f6b34fb (diff)
2009-12-06 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless GC_register_main_static_data() is defined. * dyn_load.c (GC_register_dynamic_libraries): Define only if used (if DYNAMIC_LOADING or PCR or Win32/CE). * dyn_load.c (GC_register_main_static_data): Define the default one only if DYNAMIC_LOADING. * include/private/gc_priv.h (GC_register_dynamic_libraries): Declare only if used (to prevent compiler warning).
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/dyn_load.c b/dyn_load.c
index ee50807..3d22d64 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -838,10 +838,9 @@ GC_INNER void GC_register_dynamic_libraries(void)
return GC_no_win32_dlls;
# endif
}
+# define HAVE_REGISTER_MAIN_STATIC_DATA
#endif /* DYNAMIC_LOADING */
-#define HAVE_REGISTER_MAIN_STATIC_DATA
-
# ifdef DEBUG_VIRTUALQUERY
void GC_dump_meminfo(MEMORY_BASIC_INFORMATION *buf)
{
@@ -1280,9 +1279,7 @@ GC_INNER GC_bool GC_register_main_static_data(void)
#endif /* DARWIN */
-#else /* !DYNAMIC_LOADING */
-
-#ifdef PCR
+#elif defined(PCR)
# include "il/PCR_IL.h"
# include "th/PCR_ThCtl.h"
@@ -1318,15 +1315,9 @@ GC_INNER GC_bool GC_register_main_static_data(void)
}
}
-#else /* !PCR */
-
-GC_INNER void GC_register_dynamic_libraries(void) {}
-
-#endif /* !PCR */
-
-#endif /* !DYNAMIC_LOADING */
+#endif /* PCR && !DYNAMIC_LOADING && !MSWIN32 */
-#ifndef HAVE_REGISTER_MAIN_STATIC_DATA
+#if !defined(HAVE_REGISTER_MAIN_STATIC_DATA) && defined(DYNAMIC_LOADING)
/* Do we need to separately register the main static data segment? */
GC_INNER GC_bool GC_register_main_static_data(void)
{