]> granicus.if.org Git - gc/commitdiff
2009-12-06 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Sun, 6 Dec 2009 09:08:11 +0000 (09:08 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:52 +0000 (21:06 +0400)
* 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).

ChangeLog
dyn_load.c
include/private/gc_priv.h

index 5b42b26863e50af117b7d3be9d74c6f3186d72d8..9d86b2ee6fff62b82cc757f109202535b50967cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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).
index ee50807bdc5860f2dc5519c51f61d24be4cd5f85..3d22d6436e03a9a73951b9f4c8d57dfb307f3e9e 100644 (file)
@@ -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)
   {
index 71f6b7a04a5b475d661c8c2cad0e55f8cc01c164..6442e5538540fd08af24f802b6fb16bfdcfbe1a3 100644 (file)
@@ -1545,8 +1545,11 @@ GC_INNER void GC_set_fl_marks(ptr_t p);
 #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.                    */