Submitted By: Andrew Benton <andy@benton.eu.com>
Date: 2012-06-15
Initial Package Version: 0.5.3
Upstream Status: Submitted (Applied on debian fork)
Origin:
http://sourceforge.net/tracker/index.php?func=detail&aid=3487712&group_id=39518&atid=425441
Description: fixes compiling w3m-0.5.3 with Boehm Demers Weiser GC 7.2 installed
Version -2 allows to use GC 8.0.x (update by Pierre Labastie)


diff --git a/main.c b/main.c
index b421943..865c744 100644
--- a/main.c
+++ b/main.c
@@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp)
     mySignal(SIGPIPE, SigPipe);
 #endif

+#if GC_VERSION_MAJOR > 7 || GC_VERSION_MAJOR == 7 && GC_VERSION_MINOR >= 2
+    orig_GC_warn_proc = GC_get_warn_proc();
+    GC_set_warn_proc(wrap_GC_warn_proc);
+#else
     orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+#endif
     err_msg = Strnew();
     if (load_argc == 0) {
 	/* no URL specified */
