mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 04:51:31 +02:00

Move PascalMain external from the si_*.inc files to a new include file si_impl.inc that's included in the implementation sections of the si_*.pp units git-svn-id: trunk@33970 -
48 lines
1.1 KiB
ObjectPascal
48 lines
1.1 KiB
ObjectPascal
{
|
|
This file is part of the Free Pascal run time library.
|
|
Copyright (c) 2005 by Michael Van Canneyt, Peter Vreman,
|
|
& Daniel Mantione, members of the Free Pascal development team.
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
**********************************************************************}
|
|
|
|
unit si_c21g;
|
|
|
|
interface
|
|
|
|
{$i si_intf.inc}
|
|
|
|
implementation
|
|
|
|
{$i sysnr.inc}
|
|
{$i si_impl.inc}
|
|
{$i si_c21.inc}
|
|
|
|
var
|
|
gmon_started: boolean;
|
|
gmon_start : record end;external name 'PASCALMAIN';
|
|
gmon_etext : record end;external name '_etext';
|
|
|
|
|
|
procedure atexit(p: pointer); cdecl; external;
|
|
procedure monstartup (main,etext : pointer); cdecl; external;
|
|
procedure _mcleanup; cdecl; external;
|
|
|
|
procedure __gmon_start__; cdecl; public;
|
|
begin
|
|
if not gmon_started then
|
|
begin
|
|
gmon_started:=true;
|
|
monstartup(@gmon_start,@gmon_etext);
|
|
atexit(@_mcleanup);
|
|
end;
|
|
end;
|
|
|
|
end.
|