[m-dev.] for review: don't enable backwards compatibility macros by default
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Oct 26 19:15:21 AEST 1999
Estimated hours taken: 0.25
Ensure that new code doesn't make use of the backwards
compatibility macros that were there mostly for bootstrapping.
runtime/mercury_bootstrap.h:
Move most of the macros here into a new section
where they are only defined if a new macro
MR_EXTRA_BACKWARDS_COMPAT is defined.
runtime/mercury_conf_param.h:
Document MR_EXTRA_BACKWARDS_COMPAT.
Workspace: /home/mercury0/fjh/mercury
Index: runtime/mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.10
diff -u -d -r1.10 mercury_bootstrap.h
--- mercury_bootstrap.h 1999/09/30 08:06:50 1.10
+++ mercury_bootstrap.h 1999/10/26 09:13:11
@@ -15,12 +15,18 @@
#ifndef MERCURY_BOOTSTRAP_H
#define MERCURY_BOOTSTRAP_H
+/*---------------------------------------------------------------------------*/
+/*
+** This stuff is enabled by default,
+** but you can disable it by defining MR_NO_BACKWARDS_COMPAT.
+*/
+
+#ifndef MR_NO_BACKWARDS_COMPAT
+
#define COMPARE_EQUAL MR_COMPARE_EQUAL
#define COMPARE_LESS MR_COMPARE_LESS
#define COMPARE_GREATER MR_COMPARE_GREATER
-#ifndef MR_NO_BACKWARDS_COMPAT
-
/*
** The list manipulation macros are available for use by ordinary Mercury
** programmers. People may have written code using these macros before their
@@ -34,6 +40,15 @@
#define list_empty() MR_list_empty()
#define list_cons(h, t) MR_list_cons((h), (t))
+#endif /* MR_NO_BACKWARDS_COMPAT */
+
+/*---------------------------------------------------------------------------*/
+/*
+** This stuff is not enabled by default.
+** To enable it, you must explicitly define MR_EXTRA_BACKWARDS_COMPAT.
+*/
+#ifdef MR_EXTRA_BACKWARDS_COMPAT
+
#define succip MR_succip
#define hp MR_hp
#define sp MR_sp
@@ -237,6 +252,6 @@
#define mercury_data___type_ctor_info_func_0_struct \
MR_TypeCtorInfo_struct
-#endif /* not MR_NO_BACKWARDS_COMPAT */
+#endif /* MR_EXTRA_BACKWARDS_COMPAT */
#endif /* MERCURY_BOOTSTRAP_H */
Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.26
diff -u -d -r1.26 mercury_conf_param.h
--- mercury_conf_param.h 1999/10/10 02:35:14 1.26
+++ mercury_conf_param.h 1999/10/26 09:08:34
@@ -76,6 +76,11 @@
** Disable backwards compatibility with C code using obsolete low-level
** constructs, e.g. referring to variables and macros without their MR_
** prefixes.
+**
+** MR_EXTRA_BACKWARDS_COMPAT
+** Add extra backwards compatibility with C code using obsolete low-level
+** constructs, e.g. referring to variables and macros without their MR_
+** prefixes.
*/
/*
--
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list