diff: mercury_grade.c improvement
Fergus Henderson
fjh at hydra.cs.mu.oz.au
Mon Oct 6 16:54:01 AEST 1997
runtime/mercury_grade.c:
Export a symbol `MR_runtime_grade', to ensure that
we get a "symbol multiply defined" error if different
versions of mercury_grade.o are linked in to the executable.
cvs diff: Diffing .
Index: mercury_grade.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_grade.c,v
retrieving revision 1.1
diff -u -u -r1.1 mercury_grade.c
--- mercury_grade.c 1997/10/02 00:11:43 1.1
+++ mercury_grade.c 1997/10/06 06:50:18
@@ -13,3 +13,10 @@
** then it will have an unresolved reference which will cause a link error.
*/
const char MR_GRADE_VAR = 0;
+
+/*
+** To ensure that the final executable file doesn't have multiple
+** copies of this object file linked into it, we export a dummy symbol
+** whose name does not depend on the grade.
+*/
+const char MR_runtime_grade = 0;
cvs diff: Diffing machdeps
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list