[m-dev.] for review: fix Aditi initialization code

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Feb 13 02:53:17 AEDT 2000


On 04-Feb-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> Remove the dependency of the Aditi interface library in
> extras/aditi/aditi.m on code in the automatically generated
> C init file.
...
> Index: util/mkinit.c
> ===================================================================
> RCS file: /home/staff/zs/imp/mercury/util/mkinit.c,v
> retrieving revision 1.60
> diff -u -u -r1.60 mkinit.c
> --- mkinit.c	1999/12/22 03:41:58	1.60
> +++ mkinit.c	2000/02/04 04:17:51
> @@ -526,7 +542,17 @@
>  static void 
>  output_main(void)
>  {
> -	printf(mercury_funcs, need_tracing, entry_point, entry_point);
> +	char *aditi_load_func;
> +
> +	if (aditi) {
> +		aditi_load_func = "MR_do_load_aditi_rl_code";
> +	} else {
> +		aditi_load_func = "NULL";
> +	}

s/char */const char */

I'll commit the fix for this one myself.

----------

Estimated hours taken: 0.1

util/mkinit.c:
	Add a missing `const', to avoid a warning with gcc -Wwrite-string.

Workspace: /mount/munkora/mercury1/fjh/test_mercury_munta/tmp/mercury-compiler-rotd-2000-02-12
Index: util/mkinit.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/util/mkinit.c,v
retrieving revision 1.61
diff -u -d -r1.61 mkinit.c
--- 1.61	2000/02/08 02:08:08
+++ mkinit.c	2000/02/12 15:50:07
@@ -542,7 +542,7 @@
 static void 
 output_main(void)
 {
-	char *aditi_load_func;
+	const char *aditi_load_func;
 
 	if (aditi) {
 		aditi_load_func = "MR_do_load_aditi_rl_code";

-- 
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.
--------------------------------------------------------------------------
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