[m-rev.] diff: fix one more install failure on jupiter

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Mar 24 14:33:29 AEDT 2004


library/io.m:
	Fix an error in the Mercury code of io__read_into_array. This code
	caused install failures in Java grades (the C backends that used
	a foreign_proc definition of the predicate).

	Fix an unrelated determinism warning.

Zoltan.

cvs diff: Diffing .
Index: io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.320
diff -u -b -r1.320 io.m
--- io.m	15 Mar 2004 06:50:15 -0000	1.320
+++ io.m	24 Mar 2004 03:28:00 -0000
@@ -2123,8 +2123,12 @@
 :- pragma export(make_win32_err_msg(in, in, out, di, uo),
 		"ML_make_win32_err_msg").
 
-make_win32_err_msg(_, _, _, _, _) :-
-	error("io__make_win32_err_msg called for non Win32 back-end").
+make_win32_err_msg(_, _, "", !IO) :-
+	( semidet_succeed ->
+		error("io__make_win32_err_msg called for non Win32 back-end")
+	;
+		true
+	).
 
 :- pragma foreign_proc("C",
 	make_win32_err_msg(Error::in, Msg0::in, Msg::out, IO0::di, IO::uo),
@@ -3129,7 +3133,7 @@
 }").
 
 io__read_into_buffer(Stream, buffer(Array0), buffer(Array), !Pos, Size, !IO) :-
-	io__read_into_array(Stream, Size, Array0, Array, !Pos, !IO).
+	io__read_into_array(Stream, Array0, Array, !Pos, Size, !IO).
 
 :- pred io__read_into_array(stream::in,
 	array(char)::array_di, array(char)::array_uo, int::in, int::out,
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list