+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).
+
2009-12-04 Ivan Maidanski <ivmai@mail.ru>
* mark_rts.c (GC_approx_sp): Add a comment (for GCC).
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)
{
#endif /* DARWIN */
-#else /* !DYNAMIC_LOADING */
-
-#ifdef PCR
+#elif defined(PCR)
# include "il/PCR_IL.h"
# include "th/PCR_ThCtl.h"
}
}
-#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)
{
#endif
void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp);
GC_INNER void GC_exclude_static_roots_inner(void *start, void *finish);
-GC_INNER void GC_register_dynamic_libraries(void);
+#if defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \
+ || defined(PCR)
+ GC_INNER void GC_register_dynamic_libraries(void);
/* Add dynamic library data sections to the root set. */
+#endif
GC_INNER void GC_cond_register_dynamic_libraries(void);
/* Remove and reregister dynamic libraries if we're */
/* configured to do that at each GC. */