diff: bug fixes for aet's bytecode changes

Fergus Henderson fjh at cs.mu.oz.au
Thu Apr 24 01:19:31 AEST 1997


Hi Bert,

Can you please review this one?

-----------------------------------------------------------------------------

Fix a couple of bugs in Bert's recent changes to add new configuration
variables for the bytecode.

configure.in:
	Fix a bug (missing `cv_' in some occurrences of
	`mercury_cv_double_is_64_bits').

configure.in:
runtime/conf.h.in:
runtime/mercury_types.in:
	Insert `MR_' prefixes in front of the following configuration macros:
		BIG_ENDIAN LITTLE_ENDIAN
		FLOAT_IS_64_BITS DOUBLE_IS_64_BITS LONG_DOUBLE_IS_64_BITS
	This avoids a name clash for `BIG_ENDIAN' and `LITTLE_ENDIAN',
	which on Digital Unix are both defined in <machine/endian.h>,
	which is include by <ucontext.h>, which we use.

Index: conf.h.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/conf.h.in,v
retrieving revision 1.14
diff -u -r1.14 conf.h.in
--- conf.h.in	1997/04/15 05:58:07	1.14
+++ conf.h.in	1997/04/23 15:01:20
@@ -55,11 +55,12 @@
 **	SIGACTION_FIELD		the name of the field in the sigaction struct
 **				(either sa_handler or sa_sigaction).
 **	PARALLEL		we are configuring for parallel execution
-**	FLOAT_IS_64_BITS	The C type `float' is 64-bit on this host.
-**	DOUBLE_IS_64_BITS	The C type `double' is 64-bit on this host.
-**	LONG_DOUBLE_IS_64_BITS	The C type `long double' is 64-bit on this host.
-**	BIG_ENDIAN		This host is big-endian.
-**	LITTLE_ENDIAN		This host is little-endian.
+**	MR_FLOAT_IS_64_BITS	The C type `float' is 64-bit on this host.
+**	MR_DOUBLE_IS_64_BITS	The C type `double' is 64-bit on this host.
+**	MR_LONG_DOUBLE_IS_64_BITS	The C type `long double' is 64-bit
+**				on this host.
+**	MR_BIG_ENDIAN		This host is big-endian.
+**	MR_LITTLE_ENDIAN	This host is little-endian.
 */
 
 #undef	WORD_TYPE
@@ -86,10 +87,10 @@
 #undef	HAVE_SIGACTION
 #undef	SIGACTION_FIELD
 #undef	PARALLEL
-#undef	FLOAT_IS_64_BIT
-#undef	DOUBLE_IS_64_BIT
-#undef	LONG_DOUBLE_IS_64_BIT
-#undef	BIG_ENDIAN
-#undef	LITTLE_ENDIAN
+#undef	MR_FLOAT_IS_64_BIT
+#undef	MR_DOUBLE_IS_64_BIT
+#undef	MR_LONG_DOUBLE_IS_64_BIT
+#undef	MR_BIG_ENDIAN
+#undef	MR_LITTLE_ENDIAN
 
 #endif /* CONF_H */
Index: mercury_types.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_types.h,v
retrieving revision 1.3
diff -u -r1.3 mercury_types.h
--- mercury_types.h	1997/04/15 05:58:08	1.3
+++ mercury_types.h	1997/04/23 15:04:12
@@ -29,11 +29,11 @@
 ** XXX: We should also check for IEEE-754 compliance.
 */
 
-#if	FLOAT_IS_64_BIT
+#if	MR_FLOAT_IS_64_BIT
 	typedef	float			Float64;
-#elif	DOUBLE_IS_64_BIT
+#elif	MR_DOUBLE_IS_64_BIT
 	typedef	double			Float64;
-#elif	LONG_DOUBLE_IS_64_BIT
+#elif	MR_LONG_DOUBLE_IS_64_BIT
 	typedef	long double		Float64;
 #else
 	#error	For Mercury bytecode, we require 64-bit IEEE-754 floating point
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.89
diff -u -r1.89 configure.in
--- configure.in	1997/04/15 05:57:59	1.89
+++ configure.in	1997/04/23 15:09:18
@@ -776,9 +776,9 @@
 )
 AC_MSG_RESULT($mercury_cv_float_is_64_bit)
 if test "$mercury_cv_float_is_64_bit" = yes; then
-	AC_DEFINE(FLOAT_IS_64_BIT)
+	AC_DEFINE(MR_FLOAT_IS_64_BIT)
 fi
-AC_SUBST(FLOAT_IS_64_BIT)
+AC_SUBST(MR_FLOAT_IS_64_BIT)
 #-----------------------------------------------------------------------------#
 AC_MSG_CHECKING(whether double is 64-bit)
 AC_CACHE_VAL(mercury_cv_double_is_64_bit,
@@ -790,15 +790,15 @@
 		else
 			exit(1);
 	}],
-	[mercury_double_is_64_bit=yes],
-	[mercury_double_is_64_bit=no],
-	[mercury_double_is_64_bit=no])
+	[mercury_cv_double_is_64_bit=yes],
+	[mercury_cv_double_is_64_bit=no],
+	[mercury_cv_double_is_64_bit=no])
 )
-AC_MSG_RESULT($mercury_double_is_64_bit)
-if test "$mercury_double_is_64_bit" = yes; then
-	AC_DEFINE(DOUBLE_IS_64_BIT)
+AC_MSG_RESULT($mercury_cv_double_is_64_bit)
+if test "$mercury_cv_double_is_64_bit" = yes; then
+	AC_DEFINE(MR_DOUBLE_IS_64_BIT)
 fi
-AC_SUBST(DOUBLE_IS_64_BIT)
+AC_SUBST(MR_DOUBLE_IS_64_BIT)
 #-----------------------------------------------------------------------------#
 AC_MSG_CHECKING(whether long double is 64-bit)
 AC_CACHE_VAL(mercury_cv_long_double_is_64_bit,
@@ -816,9 +816,9 @@
 )
 AC_MSG_RESULT($mercury_cv_long_double_is_64_bit)
 if test "$mercury_cv_long_double_is_64_bit" = yes; then
-	AC_DEFINE(LONG_DOUBLE_IS_64_BIT)
+	AC_DEFINE(MR_LONG_DOUBLE_IS_64_BIT)
 fi
-AC_SUBST(LONG_DOUBLE_IS_64_BIT)
+AC_SUBST(MR_LONG_DOUBLE_IS_64_BIT)
 #-----------------------------------------------------------------------------#
 AC_MSG_CHECKING(whether architecture is big-endian)
 AC_CACHE_VAL(mercury_cv_is_bigender,
@@ -840,9 +840,9 @@
 )
 AC_MSG_RESULT($mercury_cv_is_bigender)
 if test "$mercury_cv_is_bigender" = yes; then
-	AC_DEFINE(BIG_ENDIAN)
+	AC_DEFINE(MR_BIG_ENDIAN)
 fi
-AC_SUBST(BIG_ENDIAN)
+AC_SUBST(MR_BIG_ENDIAN)
 #-----------------------------------------------------------------------------#
 AC_MSG_CHECKING(whether architecture is little-endian)
 AC_CACHE_VAL(mercury_cv_is_littleender,
@@ -864,9 +864,9 @@
 )
 AC_MSG_RESULT($mercury_cv_is_littleender)
 if test "$mercury_cv_is_littleender" = yes; then
-	AC_DEFINE(LITTLE_ENDIAN)
+	AC_DEFINE(MR_LITTLE_ENDIAN)
 fi
-AC_SUBST(LITTLE_ENDIAN)
+AC_SUBST(MR_LITTLE_ENDIAN)
 #-----------------------------------------------------------------------------#
 #
 # For Irix 5, gcc labels don't work with shared libraries,

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list