* heap and heapsize removed

* checkpointer fixes
This commit is contained in:
peter 2004-10-25 15:38:41 +00:00
parent 8706d9bec9
commit e7459f5466
37 changed files with 352 additions and 327 deletions

View File

@ -50,10 +50,6 @@ interface
globtype,version,systems,cpuinfo;
const
{$ifdef Splitheap}
testsplit : boolean = false;
{$endif Splitheap}
delphimodeswitches : tmodeswitches=
[m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
@ -235,7 +231,6 @@ interface
aktsourcecodepage : tcodepagestring;
{ Memory sizes }
heapsize,
stacksize : longint;
{$Ifdef EXTDEBUG}
@ -2126,7 +2121,6 @@ implementation
{ memory sizes, will be overriden by parameter or default for target
in options or init_parser }
stacksize:=0;
heapsize:=0;
apptype:=app_cui;
end;
@ -2134,7 +2128,11 @@ implementation
end.
{
$Log$
Revision 1.147 2004-10-16 22:46:14 olle
Revision 1.148 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.147 2004/10/16 22:46:14 olle
* Fixed printing of filedates
Revision 1.146 2004/10/16 13:03:13 olle

View File

@ -79,6 +79,7 @@ than 255 characters. That's why using Ansi Strings}
{ codegen }
cs_check_overflow,cs_check_range,cs_check_object,
cs_check_io,cs_check_stack,
cs_checkpointer,
cs_omitstackframe,cs_do_assertion,cs_generate_rtti,
cs_full_boolean_eval,cs_typed_const_writable,
{ mmx }
@ -120,7 +121,7 @@ than 255 characters. That's why using Ansi Strings}
cs_browser_log,
{ debugger }
cs_gdb_dbx,cs_gdb_gsym,cs_gdb_heaptrc,cs_gdb_lineinfo,
cs_checkpointer,cs_gdb_valgrind,cs_gdb_dwarf,
cs_gdb_valgrind,cs_gdb_dwarf,
{ assembling }
cs_asm_leave,cs_asm_extern,cs_asm_pipe,cs_asm_source,
cs_asm_regalloc,cs_asm_tempalloc,cs_asm_nodes,
@ -306,7 +307,11 @@ implementation
end.
{
$Log$
Revision 1.62 2004-10-15 09:14:16 mazen
Revision 1.63 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.62 2004/10/15 09:14:16 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -1039,8 +1039,9 @@ type
if (po_abstractmethod in hp.procoptions) then
AbstractMethodsList.Insert(hp.procsym.realname)
else
{ If this symbol is an overriding method, then remove it from the list }
if po_overridingmethod in hp.procoptions then
{ If this symbol is a virtual (includes override) method,
then remove it from the list }
if po_virtualmethod in hp.procoptions then
AbstractMethodsList.Remove(hp.procsym.realname);
end;
end;
@ -1405,7 +1406,6 @@ type
i : longint;
method_must_be_valid,
is_const : boolean;
hp : tnode;
label
errorexit;
begin
@ -2070,7 +2070,7 @@ type
errorexit;
begin
result:=nil;
{!!!!!!!!
(*
if (procdefinition.proccalloption=pocall_inline) and
{ can we inline this procedure at the node level? }
(tprocdef(procdefinition).inlininginfo^.inlinenode) then
@ -2117,7 +2117,8 @@ type
exit;
end;
end;
}
*)
{ calculate the parameter info for the procdef }
if not procdefinition.has_paraloc_info then
begin
@ -2415,7 +2416,11 @@ begin
end.
{
$Log$
Revision 1.252 2004-10-15 09:14:16 mazen
Revision 1.253 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.252 2004/10/15 09:14:16 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -267,9 +267,12 @@ implementation
end;
end;
if (cs_gdb_heaptrc in aktglobalswitches) and
(cs_checkpointer in aktglobalswitches) and
(cs_checkpointer in aktlocalswitches) and
not(cs_compilesystem in aktmoduleswitches) and
(not tpointerdef(left.resulttype.def).is_far) then
not(
tpointerdef(left.resulttype.def).is_far or
is_dynamic_array(left.resulttype.def)
) then
begin
paraloc1.init;
paramanager.getintparaloc(pocall_default,1,paraloc1);
@ -324,7 +327,7 @@ implementation
end;
{ implicit deferencing }
if (cs_gdb_heaptrc in aktglobalswitches) and
(cs_checkpointer in aktglobalswitches) and
(cs_checkpointer in aktlocalswitches) and
not(cs_compilesystem in aktmoduleswitches) then
begin
paramanager.getintparaloc(pocall_default,1,paraloc1);
@ -342,7 +345,7 @@ implementation
cg.a_load_loc_ref(exprasmlist,OS_ADDR,left.location,location.reference);
{ implicit deferencing also for interfaces }
if (cs_gdb_heaptrc in aktglobalswitches) and
(cs_checkpointer in aktglobalswitches) and
(cs_checkpointer in aktlocalswitches) and
not(cs_compilesystem in aktmoduleswitches) then
begin
paramanager.getintparaloc(pocall_default,1,paraloc1);
@ -494,7 +497,6 @@ implementation
procedure tcgvecnode.rangecheck_array;
var
freereg : boolean;
hightree : tnode;
poslabel,
neglabel : tasmlabel;
@ -517,13 +519,11 @@ implementation
firstpass(hightree);
secondpass(hightree);
{ generate compares }
freereg:=false;
if (right.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
hreg:=cg.makeregsize(exprasmlist,right.location.register,OS_INT)
else
begin
hreg:=cg.getintregister(exprasmlist,OS_INT);
freereg:=true;
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,hreg);
end;
objectlibrary.getlabel(neglabel);
@ -879,7 +879,11 @@ begin
end.
{
$Log$
Revision 1.97 2004-09-25 14:23:54 peter
Revision 1.98 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.97 2004/09/25 14:23:54 peter
* ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
* renamed (get|unget)explicitregister(s) to ..cpuregister

View File

@ -247,17 +247,23 @@ begin
{$ifdef i386}
'3',
{$endif}
{$ifdef x86_64}
'4',
{$endif}
{$ifdef m68k}
'6',
{$endif}
{$ifdef arm}
'S',
{$endif}
{$ifdef powerpc}
'P',
{$endif}
{$ifdef vis}
'V',
{$endif}
{$ifdef sparc}
'S',
{$endif}
{$ifdef m68k}
'6',
{$ifdef vis}
'V',
{$endif}
'*' : show:=true;
end;
@ -506,16 +512,6 @@ begin
end;
'g' :
include(initmoduleswitches,cs_create_pic);
'h' :
begin
val(copy(more,j+1,length(more)-j),heapsize,code);
if (code<>0) or
{$WARNING Is the upper limit for heapsize needed / useful?}
{ (heapsize>=67107840) or }
(heapsize<1024) then
IllegalPara(opt);
break;
end;
'i' :
If UnsetBool(More, j) then
exclude(initlocalswitches,cs_check_io)
@ -725,7 +721,7 @@ begin
exclude(initglobalswitches,cs_gdb_gsym);
exclude(initglobalswitches,cs_gdb_heaptrc);
exclude(initglobalswitches,cs_gdb_lineinfo);
exclude(initglobalswitches,cs_checkpointer);
exclude(initlocalswitches,cs_checkpointer);
end
else
begin
@ -774,9 +770,9 @@ begin
'c' :
begin
if UnsetBool(More, j) then
exclude(initglobalswitches,cs_checkpointer)
else
include(initglobalswitches,cs_checkpointer);
exclude(initlocalswitches,cs_checkpointer)
else
include(initlocalswitches,cs_checkpointer);
end;
'v' :
begin
@ -836,6 +832,13 @@ begin
'm' :
parapreprocess:=not UnSetBool(more,0);
'M' :
begin
more:=Upper(more);
if not SetCompileMode(more, true) then
IllegalPara(opt);
end;
'n' :
begin
if More='' then
@ -886,9 +889,7 @@ begin
end;
end;
{$ifdef Unix}
'P' : ; { Ignore used by fpc.pp }
{$endif Unix}
's' :
begin
@ -912,13 +913,6 @@ begin
end;
end;
'M' :
begin
more:=Upper(more);
if not SetCompileMode(more, true) then
IllegalPara(opt);
end;
'S' :
begin
if more[1]='I' then
@ -2113,7 +2107,11 @@ finalization
end.
{
$Log$
Revision 1.148 2004-10-24 20:01:08 peter
Revision 1.149 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.148 2004/10/24 20:01:08 peter
* remove saveregister calling convention
Revision 1.147 2004/10/15 09:14:17 mazen

View File

@ -98,10 +98,8 @@ implementation
registertais;
{ memory sizes }
if heapsize=0 then
heapsize:=target_info.heapsize;
if stacksize=0 then
stacksize:=target_info.stacksize;
stacksize:=target_info.stacksize;
{ open assembler response }
if cs_link_on_target in aktglobalswitches then
@ -123,8 +121,8 @@ implementation
case target_info.system of
system_powerpc_morphos:
include(supported_calling_conventions,pocall_syscall);
system_m68k_amiga:
include(supported_calling_conventions,pocall_syscall);
system_m68k_amiga:
include(supported_calling_conventions,pocall_syscall);
end;
end;
@ -542,18 +540,7 @@ implementation
end;
{$endif USEEXCEPT}
{ clear memory }
{$ifdef Splitheap}
if testsplit then
begin
{ temp heap should be empty after that !!!}
codegen_donemodule;
Releasetempheap;
end;
{$endif Splitheap}
{ restore old state, close trees, > 0.99.5 has heapblocks, so
it's the default to release the trees }
{ restore old state }
done_module;
if assigned(current_module) then
@ -711,7 +698,11 @@ implementation
end.
{
$Log$
Revision 1.67 2004-10-15 09:14:17 mazen
Revision 1.68 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.67 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -316,13 +316,13 @@ implementation
addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(temp),caddrnode.create(p1)));
addstatement(newstatement,cassignmentnode.create(
cderefnode.create(ctemprefnode.create(temp)),
caddnode.create(addn,
caddnode.create(ntyp,
cderefnode.create(ctemprefnode.create(temp)),
p2)));
addstatement(newstatement,ctempdeletenode.create(temp));
end
else
result:=cassignmentnode.create(p1,caddnode.create(addn,p1.getcopy,p2));
result:=cassignmentnode.create(p1,caddnode.create(ntyp,p1.getcopy,p2));
end;
@ -2478,7 +2478,11 @@ implementation
end.
{
$Log$
Revision 1.166 2004-10-15 09:14:17 mazen
Revision 1.167 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.166 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -352,52 +352,6 @@ implementation
end;
procedure insertheap;
begin
maybe_new_object_file(bssSegment);
maybe_new_object_file(dataSegment);
{ On the Macintosh Classic M68k Architecture
The Heap variable is simply a POINTER to the
real HEAP. The HEAP must be set up by the RTL
and must store the pointer in this value.
On OS/2 the heap is also intialized by the RTL. We do
not output a pointer }
case target_info.system of
system_i386_OS2:
bssSegment.concat(Tai_datablock.Create_global('HEAP',4));
system_i386_EMX:
;
system_powerpc_macos:
;
system_i386_watcom:
;
system_alpha_linux:
;
system_m68k_Mac:
bssSegment.concat(Tai_datablock.Create_global('HEAP',4));
system_m68k_PalmOS:
;
else
begin
bssSegment.concat(Tai_align.Create(var_align(heapsize)));
bssSegment.concat(Tai_datablock.Create_global('HEAP',heapsize));
end;
end;
{$ifdef m68k}
if target_info.system<>system_m68k_PalmOS then
begin
dataSegment.concat(Tai_align.Create(const_align(4)));
dataSegment.concat(Tai_symbol.Createname_global('HEAPSIZE',AT_DATA,4));
dataSegment.concat(Tai_const.Create_32bit(heapsize));
end;
{$else m68k}
dataSegment.concat(Tai_align.Create(const_align(4)));
dataSegment.concat(Tai_symbol.Createname_global('HEAPSIZE',AT_DATA,4));
dataSegment.concat(Tai_const.Create_32bit(heapsize));
{$endif m68k}
end;
procedure insertstacklength;
begin
{ stacksize can be specified and is now simulated }
@ -1111,17 +1065,6 @@ implementation
{$endif DEBUG}
constsymtable:=symtablestack;
{$ifdef Splitheap}
if testsplit then
begin
Split_Heap;
allow_special:=true;
Switch_to_temp_heap;
end;
{ it will report all crossings }
allow_special:=false;
{$endif Splitheap}
if has_impl then
begin
Message1(parser_u_parsing_implementation,current_module.modulename^);
@ -1496,11 +1439,10 @@ implementation
(target_info.system=system_i386_NETWARE) then
exportlib.generatelib;
{ insert Tables and Heap }
{ insert Tables and StackLength }
insertThreadVarTablesTable;
insertResourceTablesTable;
insertinitfinaltable;
insertheap;
insertstacklength;
{ create dwarf debuginfo }
@ -1564,7 +1506,11 @@ implementation
end.
{
$Log$
Revision 1.166 2004-10-15 09:14:17 mazen
Revision 1.167 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.166 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -103,6 +103,31 @@ implementation
end;
end;
procedure do_localswitchdefault(sw:tlocalswitch);
var
state : char;
begin
state:=current_scanner.readstatedefault;
if (sw<>cs_localnone) and (state in ['-','+','*']) then
begin
if not localswitcheschanged then
nextaktlocalswitches:=aktlocalswitches;
if state='-' then
exclude(nextaktlocalswitches,sw)
else
if state='+' then
include(nextaktlocalswitches,sw)
else
begin
if sw in initlocalswitches then
include(nextaktlocalswitches,sw)
else
exclude(nextaktlocalswitches,sw);
end;
localswitcheschanged:=true;
end;
end;
procedure do_message(w:integer);
begin
@ -231,6 +256,12 @@ implementation
end;
procedure dir_checkpointer;
begin
do_localswitchdefault(cs_checkpointer);
end;
procedure dir_objectchecks;
begin
do_localswitch(cs_check_object);
@ -517,24 +548,7 @@ implementation
current_scanner.skipspace;
l:=current_scanner.readval;
if l>1024 then
stacksize:=l;
current_scanner.skipspace;
if c=',' then
begin
current_scanner.readchar;
current_scanner.skipspace;
l:=current_scanner.readval;
if l>1024 then
heapsize:=l;
end;
if c=',' then
begin
current_scanner.readchar;
current_scanner.skipspace;
l:=current_scanner.readval;
{ Ignore this value, because the limit is set by the OS
info and shouldn't be changed by the user (PFV) }
end;
stacksize:=l;
end;
@ -892,7 +906,7 @@ implementation
begin
if not (target_info.system in [system_i386_os2,system_i386_emx,
system_i386_win32,system_i386_netware,system_i386_wdosx,
system_i386_netwlibc]) then
system_i386_netwlibc]) then
begin
Message(scan_n_version_not_support);
exit;
@ -1034,6 +1048,7 @@ implementation
AddDirective('ASSERTIONS',directive_all, @dir_assertions);
AddDirective('BOOLEVAL',directive_all, @dir_booleval);
AddDirective('CALLING',directive_all, @dir_calling);
AddDirective('CHECKPOINTER',directive_all, @dir_checkpointer);
AddDirective('CODEPAGE',directive_all, @dir_codepage);
AddDirective('COPYRIGHT',directive_all, @dir_copyright);
AddDirective('D',directive_all, @dir_description);
@ -1115,7 +1130,11 @@ begin
end.
{
$Log$
Revision 1.44 2004-10-15 09:14:17 mazen
Revision 1.45 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.44 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -148,6 +148,7 @@ interface
function readcomment:string;
function readquotedstring:string;
function readstate:char;
function readstatedefault:char;
procedure skipspace;
procedure skipuntildirective;
procedure skipcomment;
@ -2061,6 +2062,32 @@ implementation
end;
function tscannerfile.readstatedefault:char;
var
state : char;
begin
state:=' ';
if c=' ' then
begin
current_scanner.skipspace;
current_scanner.readid;
if pattern='ON' then
state:='+'
else
if pattern='OFF' then
state:='-'
else
if pattern='DEFAULT' then
state:='*';
end
else
state:=c;
if not (state in ['+','-','*']) then
Message(scan_e_wrong_switch_toggle_default);
readstatedefault:=state;
end;
procedure tscannerfile.skipspace;
begin
repeat
@ -3263,7 +3290,11 @@ exit_label:
end.
{
$Log$
Revision 1.92 2004-10-15 09:14:17 mazen
Revision 1.93 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.92 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -111,7 +111,7 @@ interface
system_arm_linux, { 31 }
system_i386_watcom, { 32 }
system_powerpc_MorphOS, { 33 }
system_x86_64_freebsd, { 34 }
system_x86_64_freebsd, { 34 }
system_i386_netwlibc { 35 }
);
@ -281,7 +281,6 @@ interface
(see also FIRST_PARM_OFFSET in GCC source)
}
first_parm_offset : longint;
heapsize,
stacksize : longint;
DllScanSupported : boolean;
use_function_relative_addresses : boolean;
@ -342,7 +341,7 @@ interface
procedure InitSystems;
{$ifdef FreeBSD}
function GetOSRelDate:Longint;
function GetOSRelDate:Longint;
{$endif}
implementation
@ -703,7 +702,11 @@ finalization
end.
{
$Log$
Revision 1.92 2004-09-04 21:18:47 armin
Revision 1.93 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.92 2004/09/04 21:18:47 armin
* target netwlibc added (libc is preferred for newer netware versions)
Revision 1.91 2004/06/29 21:00:08 peter

View File

@ -85,7 +85,6 @@ unit i_amiga;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.5 2004-06-20 08:55:32 florian
Revision 1.6 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.5 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -68,7 +68,6 @@ unit i_atari;
endian : endian_big;
stackalignment : 2;
maxCrecordalignment : 4;
heapsize : 16*1024;
stacksize : 8192;
DllScanSupported:false;
use_function_relative_addresses : false
@ -85,7 +84,11 @@ initialization
end.
{
$Log$
Revision 1.3 2004-06-20 08:55:32 florian
Revision 1.4 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.3 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -85,7 +85,6 @@ unit i_beos;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 8192;
DllScanSupported:false;
use_function_relative_addresses : true
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.5 2004-06-20 08:55:32 florian
Revision 1.6 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.5 2004/06/20 08:55:32 florian
* logs truncated
Revision 1.4 2004/02/22 16:51:50 peter

View File

@ -88,7 +88,6 @@ unit i_bsd;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -152,7 +151,6 @@ unit i_bsd;
maxCrecordalign : 8
);
first_parm_offset : 16;
heapsize : 256*1024;
stacksize : 256*1024;
DllScanSupported:false;
use_function_relative_addresses : true
@ -216,7 +214,6 @@ unit i_bsd;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -279,7 +276,6 @@ unit i_bsd;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -342,7 +338,6 @@ unit i_bsd;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -402,10 +397,9 @@ unit i_bsd;
localalignmax : 4;
recordalignmin : 0;
recordalignmax : 2;
maxCrecordalign : 4 // should be 8 probably
maxCrecordalign : 4 // should be 8 probably
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 32*1024*1024;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -471,7 +465,6 @@ unit i_bsd;
maxCrecordalign : 4
);
first_parm_offset : 24;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : false;
@ -513,7 +506,11 @@ initialization
end.
{
$Log$
Revision 1.13 2004-09-12 20:33:21 olle
Revision 1.14 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.13 2004/09/12 20:33:21 olle
* Updated compiler status
Revision 1.12 2004/06/20 08:55:32 florian

View File

@ -93,7 +93,6 @@ unit i_emx;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 256*1024;
DllScanSupported: false;
use_function_relative_addresses : false
@ -116,7 +115,11 @@ initialization
end.
{
$Log$
Revision 1.4 2004-06-20 08:55:32 florian
Revision 1.5 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.4 2004/06/20 08:55:32 florian
* logs truncated
Revision 1.3 2004/05/16 20:41:19 hajny

View File

@ -85,7 +85,6 @@ unit i_go32v2;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 2048*1024;
stacksize : 262144;
DllScanSupported : false;
use_function_relative_addresses : true
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.3 2004-06-20 08:55:32 florian
Revision 1.4 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.3 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -85,7 +85,6 @@ unit i_linux;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -149,7 +148,6 @@ unit i_linux;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 128*1024;
stacksize : 32*1024*1024;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -213,7 +211,6 @@ unit i_linux;
maxCrecordalign : 8
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 32*1024*1024;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -277,7 +274,6 @@ unit i_linux;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 32*1024*1024;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -341,7 +337,6 @@ unit i_linux;
maxCrecordalign : 8
);
first_parm_offset : 16;
heapsize : 256*1024;
stacksize : 256*1024;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -405,7 +400,6 @@ unit i_linux;
maxCrecordalign : 8
);
first_parm_offset : 92;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -469,7 +463,6 @@ unit i_linux;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -520,7 +513,11 @@ initialization
end.
{
$Log$
Revision 1.30 2004-10-24 13:36:26 peter
Revision 1.31 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.30 2004/10/24 13:36:26 peter
* gc-sections added when section smartlinking is used
Revision 1.29 2004/08/15 13:30:18 florian

View File

@ -84,7 +84,6 @@ unit i_macos;
maxCrecordalign : 16
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.17 2004-09-12 20:33:21 olle
Revision 1.18 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.17 2004/09/12 20:33:21 olle
* Updated compiler status
Revision 1.16 2004/07/05 21:26:35 olle

View File

@ -85,7 +85,6 @@ unit i_morph;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true;
@ -103,7 +102,11 @@ initialization
end.
{
$Log$
Revision 1.3 2004-04-08 00:03:51 karoly
Revision 1.4 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.3 2004/04/08 00:03:51 karoly
* mos uses sysv abi, not aix
Revision 1.2 2004/03/15 07:26:44 karoly

View File

@ -85,7 +85,6 @@ unit i_nwl;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 16384;
DllScanSupported:false;
use_function_relative_addresses : true
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.2 2004-09-26 19:51:02 armin
Revision 1.3 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.2 2004/09/26 19:51:02 armin
* added define netware and netware_libc for target netwlibc, netware_clib for netware
Revision 1.1 2004/09/04 21:18:47 armin

View File

@ -85,7 +85,6 @@ unit i_nwm;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 16384;
DllScanSupported:false;
use_function_relative_addresses : true
@ -102,7 +101,11 @@ initialization
end.
{
$Log$
Revision 1.7 2004-09-26 19:51:02 armin
Revision 1.8 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.7 2004/09/26 19:51:02 armin
* added define netware and netware_libc for target netwlibc, netware_clib for netware
Revision 1.6 2004/07/31 22:52:58 armin

View File

@ -93,7 +93,6 @@ unit i_os2;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 256*1024;
DllScanSupported: false;
use_function_relative_addresses : false
@ -116,7 +115,11 @@ initialization
end.
{
$Log$
Revision 1.5 2004-06-20 08:55:32 florian
Revision 1.6 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.5 2004/06/20 08:55:32 florian
* logs truncated
Revision 1.4 2004/05/16 20:41:19 hajny

View File

@ -68,7 +68,6 @@ unit i_palmos;
endian : endian_big;
stackalignment : 2;
maxCrecordalignment : 4;
heapsize : 128*1024;
stacksize : 8192;
DllScanSupported:false;
use_function_relative_addresses : false
@ -92,7 +91,11 @@ initialization
end.
{
$Log$
Revision 1.3 2004-06-20 08:55:32 florian
Revision 1.4 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.3 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -85,7 +85,6 @@ unit i_sunos;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -148,7 +147,6 @@ unit i_sunos;
maxCrecordalign : 8
);
first_parm_offset : 92;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:false;
use_function_relative_addresses : true
@ -171,7 +169,11 @@ initialization
end.
{
$Log$
Revision 1.4 2004-10-01 17:41:21 marco
Revision 1.5 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.4 2004/10/01 17:41:21 marco
* small updates to make playing with sparc/sunos easier
Revision 1.3 2004/06/20 08:55:32 florian

View File

@ -87,7 +87,6 @@ unit i_watcom;
maxCrecordalign : 4
);
first_parm_offset : 8;
heapsize : 2048*1024;
stacksize : 16384;
DllScanSupported : false;
use_function_relative_addresses : true
@ -104,7 +103,11 @@ initialization
end.
{
$Log$
Revision 1.4 2004-06-20 08:55:32 florian
Revision 1.5 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.4 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -85,7 +85,6 @@ unit i_wdosx;
maxCrecordalign : 16
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 32*1024*1024;
DllScanSupported:true;
use_function_relative_addresses : true
@ -104,7 +103,11 @@ initialization
end.
{
$Log$
Revision 1.6 2004-06-20 08:55:32 florian
Revision 1.7 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.6 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -93,7 +93,6 @@ unit i_win32;
maxCrecordalign : 16
);
first_parm_offset : 8;
heapsize : 256*1024;
stacksize : 262144;
DllScanSupported:true;
use_function_relative_addresses : true
@ -112,7 +111,11 @@ initialization
end.
{
$Log$
Revision 1.9 2004-08-28 20:01:46 peter
Revision 1.10 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.9 2004/08/28 20:01:46 peter
* enable case sensitive to support mixed case unit/filenames
Revision 1.8 2004/06/20 08:55:32 florian

View File

@ -330,11 +330,11 @@ begin
if (target_info.system =system_i386_freebsd) and linkpthread Then
Begin
if not (cs_link_pthread in aktglobalswitches) Then
begin
{delete pthreads from list, in this case it is in libc_r}
SharedLibFiles.Remove(SharedLibFiles.Find('pthread').str);
LibrarySuffix:='r';
end;
begin
{delete pthreads from list, in this case it is in libc_r}
SharedLibFiles.Remove(SharedLibFiles.Find('pthread').str);
LibrarySuffix:='r';
end;
End;
prtobj:='prt0';
cprtobj:='cprt0';
@ -627,7 +627,11 @@ initialization
end.
{
$Log$
Revision 1.22 2004-10-14 18:16:17 mazen
Revision 1.23 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.22 2004/10/14 18:16:17 mazen
* USE_SYSUTILS merged successfully : cycles with and without defines
* Need to be optimized in performance

View File

@ -470,12 +470,12 @@ begin
if binstr<>'' then
begin
{ Is this really required? Not anymore according to my EMX docs }
Replace(cmdstr,'$HEAPMB',tostr((heapsize+1048575) shr 20));
Replace(cmdstr,'$HEAPMB',tostr((1048575) shr 20));
{Size of the stack when an EMX program runs in OS/2.}
Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
{When an EMX program runs in DOS, the heap and stack share the
same memory pool. The heap grows upwards, the stack grows downwards.}
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+heapsize+1023) shr 10));
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$APPTYPE',AppTypeStr);
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
@ -513,7 +513,11 @@ initialization
end.
{
$Log$
Revision 1.9 2004-10-15 09:24:38 mazen
Revision 1.10 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.9 2004/10/15 09:24:38 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -70,7 +70,7 @@ begin
if name<>'' then
begin
aprocdef.setmangledname(name);
end
end
else
message(parser_e_empty_import_name);
end;
@ -149,15 +149,15 @@ begin
if s<>'' then
Add(s+' '#182);
end;
{Add last lines of the link command}
if apptype = app_tool then
Add('-t "MPST" -c "MPS " '#182);
if apptype = app_cui then {If SIOW, to avoid some warnings.}
Add('-ignoredups __start -ignoredups .__start -ignoredups main -ignoredups .main '#182);
Add('-ignoredups __start -ignoredups .__start -ignoredups main -ignoredups .main '#182);
Add('-tocdataref off -sym on -dead on -o '+ ScriptFixFileName(current_module.exefilename^));
Add('-tocdataref off -sym on -dead on -o '+ ScriptFixFileName(current_module.exefilename^));
Add('Exit If "{Status}" != 0');
@ -252,7 +252,11 @@ initialization
end.
{
$Log$
Revision 1.12 2004-09-13 16:13:04 olle
Revision 1.13 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.12 2004/09/13 16:13:04 olle
+ When link on target, the script sets file type on link.res
Revision 1.11 2004/08/20 10:30:00 olle

View File

@ -199,7 +199,7 @@ begin
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
{ Stripping Enabled? }
{ Under MorphOS a separate strip command is needed, to avoid stripping }
{ Under MorphOS a separate strip command is needed, to avoid stripping }
{ __abox__ symbol, which is required to be present in current MorphOS }
{ executables. }
if success and (cs_link_strip in aktglobalswitches) then
@ -228,7 +228,11 @@ initialization
end.
{
$Log$
Revision 1.7 2004-06-20 08:55:32 florian
Revision 1.8 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.7 2004/06/20 08:55:32 florian
* logs truncated
Revision 1.6 2004/06/08 15:04:23 karoly

View File

@ -47,10 +47,10 @@
to be in unix-format for exe2nlm)
By default, the most import files are included in freepascal.
e.g. function getgrnam(name:Pchar):Pgroup;cdecl;external 'libc' 'getgrnam';
e.g. function getgrnam(name:Pchar):Pgroup;cdecl;external 'libc' 'getgrnam';
sets IMPORT @libc.imp and MODULE libc.
To avoid setting the autoload, use ! in the name, e.g.
procedure EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
procedure EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
Function simply defined as external work without generating autoload and
IMPORT but you will get a warning from nlmconv.
@ -75,10 +75,10 @@
compile with:
ppc386 -Tnetwlibc hello
Libraries are supported but this needs at least netware 5.1 sp6,
6.0 sp3 or netware 6.5
In case there is a xdc file with the same name as the nlm name,
this file will be used for nlmconv. Otherwise a temp xdc will
be created and used.
@ -368,7 +368,7 @@ begin
if isDll then {needed to provide main}
s2 := FindObjectFile('nwl_dlle','',false)
else
else
s2 := FindObjectFile('nwl_main','',false);
Comment (V_Debug,'adding Object File '+s2);
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
@ -420,7 +420,7 @@ begin
if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
begin
S2 := FindObjectFile(s,'',false);
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
end else
begin
@ -429,10 +429,10 @@ begin
Delete(S,i,255);
S := S + '.imp'; S2 := '';
librarysearchpath.FindFile(S,S2);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+s2);
s2 := FExpand (S2);
{$endif}
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+s2);
s2 := FExpand (S2);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S2);
Comment(V_Debug,'IMPORT @'+s2);
end;
@ -450,7 +450,7 @@ begin
Here we are setting the import-files for nlmconv. I.e. for
the module libc or libc.nlm we add IMPORT @libc.imp and also
the module libc.nlm (autoload)
If a lib name begins with !, only the IMPORT will be generated
If a lib name begins with !, only the IMPORT will be generated
? may it be better to set autoload's via StaticLibFiles ? }
S:=lower (SharedLibFiles.GetFirst);
if s<>'' then
@ -459,30 +459,30 @@ begin
i:=Pos(target_info.sharedlibext,S);
if i>0 then
Delete(S,i,255);
if s[1] = '!' then
begin // special, with ! only the imp will be included but no module is autoloaded, needed i.e. for netware.imp inlcuded in libc ndk
delete (s,1,1);
S := S + '.imp';
librarysearchpath.FindFile(S,S3);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S3);
Comment(V_Debug,'IMPORT @'+S3);
end else
begin
if s[1] = '!' then
begin // special, with ! only the imp will be included but no module is autoloaded, needed i.e. for netware.imp inlcuded in libc ndk
delete (s,1,1);
S := S + '.imp';
librarysearchpath.FindFile(S,S3);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S3);
Comment(V_Debug,'IMPORT @'+S3);
end else
begin
S := S + '.imp';
librarysearchpath.FindFile(S,S3);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S3);
NLMConvLinkFile.Add('MODULE '+s2);
Comment(V_Debug,'MODULE '+S2);
Comment(V_Debug,'IMPORT @'+S3);
end;
end;
end
end;
end;
@ -653,7 +653,11 @@ initialization
end.
{
$Log$
Revision 1.7 2004-10-14 18:16:17 mazen
Revision 1.8 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.7 2004/10/14 18:16:17 mazen
* USE_SYSUTILS merged successfully : cycles with and without defines
* Need to be optimized in performance

View File

@ -375,12 +375,12 @@ begin
{$else}
NLMConvLinkFile.Add ('OUTPUT ' + FExpand(NlmNam));
{$endif}
{ start and stop-procedures }
NLMConvLinkFile.Add ('START _Prelude'); { defined in rtl/netware/nwpre.as }
NLMConvLinkFile.Add ('EXIT _Stop'); { nwpre.as }
NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION'); { system.pp }
if not (cs_link_strip in aktglobalswitches) then
begin
NLMConvLinkFile.Add ('DEBUG');
@ -402,7 +402,7 @@ begin
if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
begin
S2 := FindObjectFile(s,'',false);
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
end else
begin
@ -411,10 +411,10 @@ begin
Delete(S,i,255);
S := S + '.imp'; S2 := '';
librarysearchpath.FindFile(S,S2);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+s2);
s2 := FExpand (S2);
{$endif}
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+s2);
s2 := FExpand (S2);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S2);
Comment(V_Debug,'IMPORT @'+s2);
end;
@ -442,10 +442,10 @@ begin
Delete(S,i,255);
S := S + '.imp';
librarysearchpath.FindFile(S,S3);
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
{$ifdef netware}
Comment(V_Debug,'IMPORT @'+S3);
S3 := FExpand (S3);
{$endif}
NLMConvLinkFile.Add('IMPORT @'+S3);
NLMConvLinkFile.Add('MODULE '+s2);
Comment(V_Debug,'MODULE '+S2);
@ -571,7 +571,11 @@ initialization
end.
{
$Log$
Revision 1.18 2004-10-14 18:16:17 mazen
Revision 1.19 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.18 2004/10/14 18:16:17 mazen
* USE_SYSUTILS merged successfully : cycles with and without defines
* Need to be optimized in performance

View File

@ -470,12 +470,12 @@ begin
if binstr<>'' then
begin
{ Is this really required? Not anymore according to my EMX docs }
Replace(cmdstr,'$HEAPMB',tostr((heapsize+1048575) shr 20));
Replace(cmdstr,'$HEAPMB',tostr((1048575) shr 20));
{Size of the stack when an EMX program runs in OS/2.}
Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
{When an EMX program runs in DOS, the heap and stack share the
same memory pool. The heap grows upwards, the stack grows downwards.}
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+heapsize+1023) shr 10));
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$APPTYPE',AppTypeStr);
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
@ -513,7 +513,11 @@ initialization
end.
{
$Log$
Revision 1.13 2004-10-15 09:24:38 mazen
Revision 1.14 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.13 2004/10/15 09:24:38 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code

View File

@ -36,7 +36,6 @@ implementation
type
timportlibwdosx=class(timportlibwin32)
procedure GetDefExt(var N:longint;var P:pStr4);override;
end;
texportlibwdosx=texportlibwin32;
@ -47,22 +46,12 @@ implementation
end;
tDLLScannerWdosx=class(tDLLScannerWin32)
public
procedure GetDefExt(var N:longint;var P:pStr4);override;
end;
const
DefaultDLLExtensions:array[1..2]of string[4]=('.WDL','.DLL');
{*****************************************************************************
TIMPORTLIBWDOSX
*****************************************************************************}
procedure timportlibwdosx.GetDefExt(var N:longint;var P:pStr4);
begin
N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
pointer(P):=@DefaultDLLExtensions;
end;
{*****************************************************************************
TLINKERWDOSX
@ -80,11 +69,6 @@ end;
{****************************************************************************
TDLLScannerWdosx
****************************************************************************}
procedure tDLLScannerWdosx.GetDefExt(var N:longint;var P:pStr4);
begin
N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
pointer(P):=@DefaultDLLExtensions;
end;
{*****************************************************************************
Initialize
@ -102,7 +86,11 @@ end.
{
$Log$
Revision 1.4 2004-06-20 08:55:32 florian
Revision 1.5 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.4 2004/06/20 08:55:32 florian
* logs truncated
}

View File

@ -55,7 +55,6 @@ interface
procedure importvariable_str(const s:string;const name,module:string);
procedure importprocedure_str(const func,module:string;index:longint;const name:string);
public
procedure GetDefExt(var N:longint;var P:pStr4);virtual;
procedure preparelib(const s:string);override;
procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
procedure importvariable(vs:tvarsym;const name,module:string);override;
@ -94,7 +93,6 @@ interface
function FindDLL(const s:string;var founddll:string):boolean;
function ExtractDllName(Const Name : string) : string;
public
procedure GetDefExt(var N:longint;var P:pStr4);virtual;
function isSuitableFileType(x:cardinal):longbool;override;
function GetEdata(HeaderEntry:cardinal):longbool;override;
function Scan(const binname:string):longbool;override;
@ -105,33 +103,10 @@ implementation
uses
cpuinfo,cgutils;
function DllName(Const Name : string;NdefExt:longint;DefExt:pStr4) : string;
var n : string;
i:longint;
begin
n:=Upper(SplitExtension(Name));
for i:=1 to NdefExt do
if n=DefExt^[i]then
begin
DllName:=Name;
exit;
end
else
DllName:=Name+target_info.sharedlibext;
end;
const
DefaultDLLExtensions:array[1..MAX_DEFAULT_EXTENSIONS]of string[4]=('.DLL','.DRV','.EXE');
{*****************************************************************************
TIMPORTLIBWIN32
*****************************************************************************}
procedure timportlibwin32.GetDefExt(var N:longint;var P:pStr4);
begin
N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
pointer(P):=@DefaultDLLExtensions;
end;
procedure timportlibwin32.preparelib(const s : string);
begin
@ -145,15 +120,12 @@ const
hp1 : timportlist;
hp2 : twin32imported_item;
hs : string;
PP : pStr4;
NN : longint;
begin
{ force the current mangledname }
if assigned(aprocdef) then
aprocdef.has_mangledname:=true;
{ append extension if required }
GetDefExt(NN,PP);
hs:=DllName(module,NN,PP);
hs:=AddExtension(module,target_info.sharedlibext);
{ search for the module }
hp1:=timportlist(current_module.imports.first);
while assigned(hp1) do
@ -208,11 +180,8 @@ const
hp1 : timportlist;
hp2 : twin32imported_item;
hs : string;
NN : longint;
PP : pStr4;
begin
GetDefExt(NN,PP);
hs:=DllName(module,NN,PP);
hs:=AddExtension(module,target_info.sharedlibext);
{ search for the module }
hp1:=timportlist(current_module.imports.first);
while assigned(hp1) do
@ -1383,12 +1352,6 @@ end;
TDLLScannerWin32
****************************************************************************}
procedure tDLLScannerWin32.GetDefExt(var N:longint;var P:pStr4);
begin
N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
pointer(P):=@DefaultDLLExtensions;
end;
function tDLLScannerWin32.DOSstubOK(var x:cardinal):boolean;
begin
blockread(f,TheWord,2,loaded);
@ -1611,16 +1574,16 @@ function tDLLScannerWin32.GetEdata(HeaderEntry:cardinal):longbool;
function tDLLScannerWin32.scan(const binname:string):longbool;
var
OldFileMode:longint;
hs,
foundimp : string;
NN:longint;PP:pStr4;
begin
Scan:=false;
{ is there already an import library the we will use that one }
if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,foundimp) then
exit;
{ check if we can find the dll }
GetDefExt(NN,PP);
if not FindDll(DLLName(binname,NN,PP),impname) then
hs:=AddExtension(binname,target_info.sharedlibext);
if not FindDll(hs,impname) then
exit;
{ read the dll file }
assign(f,impname);
@ -1654,7 +1617,11 @@ initialization
end.
{
$Log$
Revision 1.39 2004-10-15 09:24:38 mazen
Revision 1.40 2004-10-25 15:38:41 peter
* heap and heapsize removed
* checkpointer fixes
Revision 1.39 2004/10/15 09:24:38 mazen
- remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code