[m-rev.] trivial diff: process_util.m: fix C conformance error

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Mar 4 01:07:10 AEDT 2003


Estimated hours taken: 0.1
Branches: main

compiler/process_util.m:
	Fix an ISO C conformance error: C global variables need to be
	declared as `extern' in the pragma foreign_decl, to avoid
	multiple definition errors on some systems (e.g. with tcc)
	if the foreign_decls get duplicated.

Workspace: /home/earth/fjh/ws-earth2/mercury
Index: compiler/process_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/process_util.m,v
retrieving revision 1.8
diff -u -d -r1.8 process_util.m
--- compiler/process_util.m	13 Feb 2003 08:28:42 -0000	1.8
+++ compiler/process_util.m	3 Mar 2003 14:03:24 -0000
@@ -133,13 +133,13 @@
 			""mercury_compile: cannot install signal handler"");
 
 	/* Have we received a signal. */
-volatile sig_atomic_t MC_signalled;
+extern volatile sig_atomic_t MC_signalled;
 
 	/*
 	** Which signal did we receive.
 	** XXX This assumes a signal number will fit into a sig_atomic_t.
 	*/
-volatile sig_atomic_t MC_signal_received;
+extern volatile sig_atomic_t MC_signal_received;
 
 void MC_mercury_compile_signal_handler(int sig);
 ").

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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