[m-rev.] diff: fix problem mdemangle.c
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Jun 21 11:37:24 AEST 2005
For both branches.
Zoltan.
util/mdemangle.c:
Fix a bug reported by m.muhammad2 at pgrad.unimelb.edu.au: mercury_regs.h
was indirectly being included before the system headers, which on
some systems include function definitions, which is not allowed.
util/mkinit.c:
Add comment to prevent future similar problems.
cvs diff: Diffing .
Index: mdemangle.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mdemangle.c,v
retrieving revision 1.52
diff -u -b -r1.52 mdemangle.c
--- mdemangle.c 1 Jun 2005 03:56:16 -0000 1.52
+++ mdemangle.c 21 Jun 2005 01:31:54 -0000
@@ -21,11 +21,12 @@
** Any changes here will need to be duplicated there and vice versa.
*/
+/* mercury_std.h includes mercury_regs.h, and must precede system headers */
+#include "mercury_std.h"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include "mercury_std.h"
/* We used this for the size of fixed-length buffers in a few places <sigh> */
#define MAX_SYMBOL_LENGTH 1000
Index: mkinit.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.98
diff -u -b -r1.98 mkinit.c
--- mkinit.c 2 May 2005 02:16:59 -0000 1.98
+++ mkinit.c 21 Jun 2005 01:32:04 -0000
@@ -20,6 +20,7 @@
/*---------------------------------------------------------------------------*/
+/* mercury_std.h includes mercury_regs.h, and must precede system headers */
#include "mercury_conf.h"
#include "mercury_std.h"
#include "getopt.h"
--------------------------------------------------------------------------
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