[m-dev.] diff: fix hlc.gc.prof link error

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Nov 11 12:08:44 AEDT 2000


Estimated hours taken: 0.25

Fix a bug that caused link errors in grade hlc.gc.prof.

runtime/mercury_ho_call.c:
	Ensure that the initialization function is defined even if
	MR_HIGHLEVEL_CODE is set, since we generate a reference to it.

Workspace: /home/pgrad/fjh/ws/hg
Index: runtime/mercury_ho_call.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.38
diff -u -d -r1.38 mercury_ho_call.c
--- runtime/mercury_ho_call.c	2000/10/04 05:28:29	1.38
+++ runtime/mercury_ho_call.c	2000/11/11 01:07:00
@@ -397,9 +397,17 @@
 #undef	select_compare_code
 }
 
+#endif /* not MR_HIGHLEVEL_CODE */
+
+/*
+** The initialization function needs to be defined even when
+** MR_HIGHLEVEL_CODE is set, because it will get included
+** in the list of initialization functions that get called.
+** So for MR_HIGHLEVEL code it just does nothing.
+*/
 void mercury_sys_init_call(void); /* suppress gcc warning */
 void mercury_sys_init_call(void) {
+#ifndef MR_HIGHLEVEL_CODE
 	call_module();
-}
-
 #endif /* not MR_HIGHLEVEL_CODE */
+}

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list