[m-rev.] diff: fix win32 portability problem

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Dec 20 16:53:35 AEDT 2004


This is a quick change to get things to compile again on Windows.
Zoltan, you may want to fix this more cleanly...

Estimated hours taken: 0.25
Branches: main

runtime/mercury_wrapper.c:
	Comment out some code that doesn't compile on Win32.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.139
diff -u -d -r1.139 mercury_wrapper.c
--- runtime/mercury_wrapper.c	14 Dec 2004 07:04:43 -0000	1.139
+++ runtime/mercury_wrapper.c	20 Dec 2004 05:47:55 -0000
@@ -35,10 +35,12 @@
 
 #include	<stdio.h>
 #include	<string.h>
+#if 0 /* XXX the following code breaks on Win32 */
 #include	<sys/types.h>
 #include	<sys/stat.h>
 #include	<fcntl.h>
 #include	<sys/resource.h>
+#endif /* breaks on Win32 */
 
 #ifdef MR_MSVC_STRUCTURED_EXCEPTIONS
   #include <excpt.h>
@@ -2000,6 +2002,7 @@
   #endif
 #endif
 
+#if 0 /* XXX the following code breaks on Win32 */
 	if (mem_usage_report) {
 		char	buf[MAX_MEM_USAGE_REPORT_FILENAME_SIZE];
 		int	i;
@@ -2042,6 +2045,7 @@
 			(void) fclose(fp);
 		}
 	}
+#endif /* breaks on Win32 */
 
 	MR_terminate_engine();
 

-- 
Fergus Henderson                    |  "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