[m-rev.] Re: for review: MinGW portability fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Apr 7 19:14:29 AEST 2001


BTW, for the diff I just posted, I forgot to mention which branch(es):

	Branches: main, release

Also, I realized that this change

On 07-Apr-2001, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> 
> compiler/modules.m:
> 	If renaming the `tmp_d' file doesn't work,
> 	try again after removing the `.d' file.
> 	This is needed since on MinGW, io__rename_file
> 	(i.e. rename()) won't remove the target if it already exists.
> 	Note that the behaviour of io__rename_file is explicitly
> 	documented as being implementation-dependent in this situation,
> 	so we need to handle this case here.

makes some of the code in library/io.m unnecessary now.
So here's another diff (just for the main branch this time).
For review by Peter Ross.

----------

Estimated hours taken: 0.25
Branches: main

library/io.m:
	Delete some MSVC-specific stuff that isn't needed.

Index: io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.220.4.2
diff -u -u -r1.220.4.2 io.m
--- io.m	2001/03/15 12:44:26	1.220.4.2
+++ io.m	2001/04/07 09:10:34
@@ -4744,10 +4744,6 @@
 			RetVal::out, RetStr::out, IO0::di, IO::uo),
 		[will_not_call_mercury, tabled_for_io, thread_safe],
 "{
-#ifdef _MSC_VER
-		/* VC++ runtime fix */
-	_unlink(NewFileName);
-#endif
 	RetVal = rename(OldFileName, NewFileName);
 	ML_maybe_make_err_msg(RetVal != 0, ""rename failed: "",
 		MR_PROC_LABEL, RetStr);

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