[m-rev.] trivial diff: protect GC_stackbottom appropriately

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jun 8 12:04:47 AEST 2011


Branches: main

util/mkinit.c:
 	Protect a reference to GC_stackbottom with #ifdef MR_BOEHM_GC.

library/bag.m:
 	Fix some inconsistent indentation.

Julien.

Index: util/mkinit.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.123
diff -u -r1.123 mkinit.c
--- util/mkinit.c	25 Mar 2011 03:13:42 -0000	1.123
+++ util/mkinit.c	7 Jun 2011 07:11:34 -0000
@@ -368,17 +368,17 @@
      "mercury_init(int argc, char **argv, void *stackbottom)\n"
      "{\n"
      "\n"
-    "#ifdef MR_CONSERVATIVE_GC\n"
+    "#if defined(MR_CONSERVATIVE_GC)\n"
      "   /*\n"
      "   ** Explicitly register the bottom of the stack, so that the\n"
      "   ** GC knows where it starts.  This is necessary for AIX 4.1\n"
      "   ** on RS/6000, and for gnu-win32 on Windows 95 or NT.\n"
      "   ** It may also be helpful on other systems.\n"
      "   */\n"
-    "   #ifdef MR_HGC\n"
+    "   #if defined(MR_HGC)\n"
      "    MR_hgc_set_stack_bot(stackbottom);\n"
-    "   #else\n"
-    "   GC_stackbottom = stackbottom;\n"
+    "   #elif defined(MR_BOEHM_GC)\n"
+    "    GC_stackbottom = stackbottom;\n"
      "   #endif\n"
      "#endif\n"
      "\n"
Index: library/bag.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/bag.m,v
retrieving revision 1.38
diff -u -r1.38 bag.m
--- library/bag.m	3 May 2011 14:22:14 -0000	1.38
+++ library/bag.m	8 Jun 2011 02:01:12 -0000
@@ -55,15 +55,15 @@
  :- func bag.insert_set(bag(T), set(T)) = bag(T).
  :- pred bag.insert_set(set(T)::in, bag(T)::in, bag(T)::out) is det.

-    % bag.member(Val, Bag) :
-    %   True iff `Bag' contains at least one occurrence of `Val'.
+    % bag.member(Val, Bag):
+    % True iff `Bag' contains at least one occurrence of `Val'.
      %
  :- pred bag.member(T::in, bag(T)::in) is semidet.

-    % bag.member(Val, Bag, Remainder) :
-    %   Nondeterministically returns all values from Bag and the
-    %   corresponding bag after the value has been removed. Duplicate values
-    %   are returned as many times as they occur in the Bag.
+    % bag.member(Val, Bag, Remainder):
+    % Nondeterministically returns all values from Bag and the
+    % corresponding bag after the value has been removed. Duplicate values
+    % are returned as many times as they occur in the Bag.
      %
  :- pred bag.member(T::out, bag(T)::in, bag(T)::out) is nondet.


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list