Files
mercury/runtime/init.h
Fergus Henderson f19e066247 Fix things so that there are no circular dependencies amoungst the
Estimated hours taken: 0.5

Fix things so that there are no circular dependencies amoungst the
libraries, so that shared libraries work better (e.g. they can
use QuickStart on Irix 5).  The dependencies are linear again:
program -> library -> runtime -> boehm_gc.  (This property was
broken by my recent changes which moved lots of stuff from the
Mercury runtime to pragma(c_code) in the Mercury library.)

rutime/init.h:
	Change the set of address variables used for communication
	between the main program, the Mercury library, and the Mercury
	runtime.  Remove address_of_io__init_state_2_0, since it is no
	longer needed, and add address_of_mercury_init_io, since it is.
	Rename entry_point as library_entry_point, and rename
	address_of_main_2_0 as program_entry_point.

rutime/wrapper.mod:
	Rename entry_point as library_entry_point, and add new `-m' option
	to set program_entry_point.  Add definitions of the address variables
	(I had moved these defitions to ../library/io.m, but that created
	a backwards dependency.)

runtime/{Mmake,io_rt.h,wrapper.mod,init.h}
	Remove io_rt.h, since io_rt.mod was removed.
	The declaration for mercury_init_io() in it has been moved to init.h.
1996-03-04 00:26:15 +00:00

32 lines
816 B
C

/*
** Copyright (C) 1995 University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
/*
** This file defines stuff used by the automatically generated *_init.c files.
*/
#ifndef INIT_H
#define INIT_H
#include "imp.h"
Declare_entry(mercury__main_2_0);
Declare_entry(mercury__io__run_0_0);
extern void mercury_init_io(void);
extern int mercury_main(int argc, char **argv);
extern Code * library_entry_point; /* normally mercury__io__run_0_0 */
extern Code * program_entry_point; /* normally mercury__main_2_0; */
extern void (*address_of_mercury_init_io)(void);
extern void (*address_of_init_modules)(void);
#ifdef CONSERVATIVE_GC
extern void (*address_of_init_gc)(void);
#endif
#endif