[m-rev.] diff: fix overnight test failures

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Jun 17 19:42:10 AEST 2003


runtime/mercury_std.h:
runtime/mercury_types.h:
	Move the definition of MR_VARIABLE_SIZED from mercury_std.h to
	mercury_types.h, and avoid the #include of mercury_std.h in
	mercury_types.h that caused problems from the configure script.

Zoltan.

Index: mercury_std.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_std.h,v
retrieving revision 1.25
diff -u -b -r1.25 mercury_std.h
--- mercury_std.h	21 Nov 2002 06:31:18 -0000	1.25
+++ mercury_std.h	17 Jun 2003 06:50:52 -0000
@@ -92,34 +92,6 @@
 /*---------------------------------------------------------------------------*/
 
 /*
-** MR_VARIABLE_SIZED -- what to put between the []s when declaring
-**			a variable length array at the end of a struct.
-**
-** The preferred values, if the compiler understands them, convey to the
-** implementation that the array has a variable length. The default value
-** is the maximum length of the variable-length arrays that we construct,
-** since giving too small a value may lead the compiler to use inappropriate
-** optimizations (e.g. using small offsets to index into the array).
-** At the moment, we use variable length arrays that are indexed by
-** closure argument numbers or by type parameter numbers. We therefore
-** use a default MR_VARIABLE_SIZED value that is at least as big as
-** both MR_MAX_VIRTUAL_REG and MR_PSEUDOTYPEINFO_MAX_VAR.
-*/
-
-#if __STDC_VERSION__ >= 199901	/* January 1999 */
-  /* Use C9X-style variable-length arrays. */
-  #define	MR_VARIABLE_SIZED	/* nothing */
-#elif defined(__GNUC__)
-  /* Use GNU-style variable-length arrays */
-  #define	MR_VARIABLE_SIZED	0
-#else
-  /* Just fake it by pretending that the array has a fixed size */
-  #define	MR_VARIABLE_SIZED	1024
-#endif
-
-/*---------------------------------------------------------------------------*/
-
-/*
 ** Macros for inlining.
 **
 ** Inlining is treated differently by C++, C99, and GNU C.
Index: mercury_types.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_types.h,v
retrieving revision 1.32
diff -u -b -r1.32 mercury_types.h
--- mercury_types.h	11 Jun 2003 12:55:59 -0000	1.32
+++ mercury_types.h	17 Jun 2003 06:51:11 -0000
@@ -23,7 +23,32 @@
 #define MERCURY_TYPES_H
 
 #include "mercury_conf.h"
-#include "mercury_std.h"    /* for MR_VARIABLE_SIZED */
+
+/*
+** MR_VARIABLE_SIZED -- what to put between the []s when declaring
+**			a variable length array at the end of a struct.
+**
+** The preferred values, if the compiler understands them, convey to the
+** implementation that the array has a variable length. The default value
+** is the maximum length of the variable-length arrays that we construct,
+** since giving too small a value may lead the compiler to use inappropriate
+** optimizations (e.g. using small offsets to index into the array).
+** At the moment, we use variable length arrays that are indexed by
+** closure argument numbers or by type parameter numbers. We therefore
+** use a default MR_VARIABLE_SIZED value that is at least as big as
+** both MR_MAX_VIRTUAL_REG and MR_PSEUDOTYPEINFO_MAX_VAR.
+*/
+
+#if __STDC_VERSION__ >= 199901	/* January 1999 */
+  /* Use C9X-style variable-length arrays. */
+  #define	MR_VARIABLE_SIZED	/* nothing */
+#elif defined(__GNUC__)
+  /* Use GNU-style variable-length arrays */
+  #define	MR_VARIABLE_SIZED	0
+#else
+  /* Just fake it by pretending that the array has a fixed size */
+  #define	MR_VARIABLE_SIZED	1024
+#endif
 
 /*
 ** This section defines types similar to C9X's <stdint.h> header.
--------------------------------------------------------------------------
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