[mercury-users] Compiling Mercury 0.11.0 under Windows XP using Visual C++ 7.0

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

On 19-Dec-2004, Alexsandro Soares <a_s_soares at yahoo.com.br> wrote:
> I´m using the latest snapshot of Mercury. Now, the
> Visual C++ compiler can't find the file
> "sys/resource.h". In fact, I checked the sys directory
> and that file doesn't exist. Any help?

That is a recently-introduced portability problem,
which looks like it was caused by zs's 14-Dec-2004 patch
to runtime/mercury_wrapper.c (i.e. revision 1.139).

The following patch, which I have just committed, should fix it.

Estimated hours taken: 0.25
Branches: main

	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 */
   #include <excpt.h>
@@ -2000,6 +2002,7 @@
+#if 0 /* XXX the following code breaks on Win32 */
 	if (mem_usage_report) {
 		int	i;
@@ -2042,6 +2045,7 @@
 			(void) fclose(fp);
+#endif /* breaks on Win32 */

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-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list