[m-rev.] diff: fix global register problem

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon May 24 14:32:29 AEST 2004


Fix problems with namespace cleanliness on ender.

runtime/mercury_library_types.h:
runtime/mercury_signal.h:
runtime/mercury_stack_trace.h:
runtime/mercury_std.h:
trace/mercury_trace_vars.h
util/mkinit.c:
	Make sure that we include mercury_regs.h before system header files
	with functions.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_library_types.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_library_types.h,v
retrieving revision 1.12
diff -u -b -r1.12 mercury_library_types.h
--- runtime/mercury_library_types.h	14 Sep 2003 22:24:37 -0000	1.12
+++ runtime/mercury_library_types.h	24 May 2004 00:37:48 -0000
@@ -12,10 +12,11 @@
 #ifndef MERCURY_LIBRARY_TYPES_H
 #define MERCURY_LIBRARY_TYPES_H
 
-#include <stdio.h>		/* for `FILE' */
-#include <stdarg.h>		/* for `va_list' */
+#include "mercury_regs.h"	/* must include before system headers */
 #include "mercury_types.h"	/* for `MR_Word' and `MR_Integer' */
 #include "mercury_std.h"	/* for MR_VARIABLE_SIZED */
+#include <stdio.h>		/* for `FILE' */
+#include <stdarg.h>		/* for `va_list' */
 
 /*
 ** The C `MercuryFile' type is used for the Mercury `io__stream' type
Index: runtime/mercury_signal.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_signal.h,v
retrieving revision 1.12
diff -u -b -r1.12 mercury_signal.h
--- runtime/mercury_signal.h	21 Nov 2002 06:31:19 -0000	1.12
+++ runtime/mercury_signal.h	24 May 2004 00:37:48 -0000
@@ -16,6 +16,7 @@
 #ifndef	MERCURY_SIGNAL_H
 #define	MERCURY_SIGNAL_H
 
+#include "mercury_regs.h"	/* include before system headers */
 #include "mercury_conf.h"
 
 #ifdef MR_HAVE_SIGCONTEXT_STRUCT
Index: runtime/mercury_stack_trace.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_stack_trace.h,v
retrieving revision 1.32
diff -u -b -r1.32 mercury_stack_trace.h
--- runtime/mercury_stack_trace.h	12 Mar 2004 06:02:07 -0000	1.32
+++ runtime/mercury_stack_trace.h	24 May 2004 00:37:48 -0000
@@ -7,8 +7,9 @@
 #ifndef MERCURY_STACK_TRACE_H
 #define MERCURY_STACK_TRACE_H
 
-#include <stdio.h>
+#include "mercury_regs.h"
 #include "mercury_stack_layout.h"
+#include <stdio.h>
 
 /*
 ** mercury_stack_trace.h -
Index: runtime/mercury_std.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_std.h,v
retrieving revision 1.27
diff -u -b -r1.27 mercury_std.h
--- runtime/mercury_std.h	19 May 2004 03:59:52 -0000	1.27
+++ runtime/mercury_std.h	24 May 2004 00:37:48 -0000
@@ -12,6 +12,14 @@
 #ifndef MERCURY_STD_H
 #define MERCURY_STD_H
 
+/*
+** We include mercury_regs.h to ensure we define any global register variables
+** before any functions, even if the system libraries we include below it
+** define any functions.
+*/
+
+#include "mercury_regs.h"
+
 #include <stdlib.h>	/* for size_t */
 #include <assert.h>	/* for assert() */
 #include <errno.h>	/* for EINTR */
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
Index: trace/mercury_trace_vars.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_vars.h,v
retrieving revision 1.24
diff -u -b -r1.24 mercury_trace_vars.h
--- trace/mercury_trace_vars.h	13 May 2004 08:50:34 -0000	1.24
+++ trace/mercury_trace_vars.h	24 May 2004 00:37:48 -0000
@@ -47,13 +47,13 @@
 #ifndef	MERCURY_TRACE_VARS_H
 #define	MERCURY_TRACE_VARS_H
 
-#include <stdio.h>
 #include "mercury_types.h"		/* for MR_Word etc         */
 #include "mercury_stack_layout.h"	/* for MR_Label_Layout etc */
 #include "mercury_type_info.h"		/* for MR_TypeInfo         */
 #include "mercury_trace_base.h"		/* for MR_Trace_Port       */
 #include "mercury_trace_browse.h"	/* for MR_Browser          */
 #include "mercury_trace_completion.h"	/* for MR_Completer_List   */
+#include <stdio.h>
 
 typedef	void	(*MR_Browser)(MR_Word type_info, MR_Word value,
 			MR_Browse_Caller_Type caller, MR_Browse_Format format);
cvs diff: Diffing util
Index: util/mkinit.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.92
diff -u -b -r1.92 mkinit.c
--- util/mkinit.c	20 Oct 2003 07:29:59 -0000	1.92
+++ util/mkinit.c	24 May 2004 00:37:48 -0000
@@ -18,14 +18,16 @@
 
 /*---------------------------------------------------------------------------*/
 
+#include	"mercury_conf.h"
+#include	"mercury_std.h"
+#include	"getopt.h"
+
 #include	<stdio.h>
 #include	<stdlib.h>
 #include	<string.h>
 #include	<ctype.h>
 #include	<errno.h>
 
-#include	"mercury_conf.h"
-
 #ifdef MR_HAVE_SYS_STAT_H
   #include	<sys/stat.h>
 #endif
@@ -33,9 +35,6 @@
 #ifdef MR_HAVE_UNISTD_H
   #include	<unistd.h>
 #endif
-
-#include	"getopt.h"
-#include	"mercury_std.h"
 
 /* --- adjustable limits --- */
 #define	MAXCALLS	40	/* maximum number of calls per function */
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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