From e2e2b508be28cb00541f4d48a01570f593aeb39c Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 4 Jun 2001 11:49:08 +0000 Subject: [PATCH] * store used units in original type in ppu --- compiler/fmodule.pas | 11 +++++++++-- compiler/fppu.pas | 15 +++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/compiler/fmodule.pas b/compiler/fmodule.pas index ae0ca8a10f..9d8bd7fcfc 100644 --- a/compiler/fmodule.pas +++ b/compiler/fmodule.pas @@ -137,6 +137,7 @@ interface tused_unit = class(tlinkedlistitem) unitid : longint; name : pstring; + realname : pstring; checksum, interface_checksum : cardinal; loaded : boolean; @@ -312,6 +313,7 @@ uses is_stab_written:=false; loaded:=true; name:=stringdup(_u.modulename^); + realname:=stringdup(_u.realmodulename^); checksum:=_u.crc; interface_checksum:=_u.interface_crc; unitid:=0; @@ -325,7 +327,8 @@ uses in_uses:=false; is_stab_written:=false; loaded:=false; - name:=stringdup(n); + name:=stringdup(upper(n)); + realname:=stringdup(n); checksum:=c; interface_checksum:=intfc; unitid:=0; @@ -334,6 +337,7 @@ uses destructor tused_unit.destroy; begin + stringdispose(realname); stringdispose(name); inherited destroy; end; @@ -585,7 +589,10 @@ uses end. { $Log$ - Revision 1.16 2001-06-03 15:15:31 peter + Revision 1.17 2001-06-04 11:49:08 peter + * store used units in original type in ppu + + Revision 1.16 2001/06/03 15:15:31 peter * dllprt0 stub for linux shared libs * pass -init and -fini for linux shared libs * libprefix splitted into staticlibprefix and sharedlibprefix diff --git a/compiler/fppu.pas b/compiler/fppu.pas index adc24a730a..bad99876e8 100644 --- a/compiler/fppu.pas +++ b/compiler/fppu.pas @@ -414,7 +414,7 @@ uses { implementation units should not change the CRC PM } ppufile.do_crc:=hp.in_interface; - ppufile.putstring(hp.name^); + ppufile.putstring(hp.realname^); { the checksum should not affect the crc of this unit ! (PFV) } ppufile.do_crc:=false; ppufile.putlongint(longint(hp.checksum)); @@ -876,7 +876,7 @@ uses begin if (not pu.loaded) and (pu.in_interface) then begin - loaded_unit:=loadunit(pu.name^,''); + loaded_unit:=loadunit(pu.realname^,''); if compiled then exit; { register unit in used units } @@ -887,7 +887,7 @@ uses { need to recompile the current unit ? } if loaded_unit.crc<>pu.checksum then begin - Message2(unit_u_recompile_crc_change,modulename^,pu.name^); + Message2(unit_u_recompile_crc_change,realmodulename^,pu.realname^); recompile_reason:=rr_crcchanged; do_compile:=true; dispose(map); @@ -918,7 +918,7 @@ uses begin if (not pu.loaded) and (not pu.in_interface) then begin - loaded_unit:=loadunit(pu.name^,''); + loaded_unit:=loadunit(pu.realname^,''); if compiled then exit; { register unit in used units } @@ -928,7 +928,7 @@ uses if (loaded_unit.interface_crc<>pu.interface_checksum) {and not(current_module.in_second_compile) } then begin - Message2(unit_u_recompile_crc_change,modulename^,pu.name^+' {impl}'); + Message2(unit_u_recompile_crc_change,realmodulename^,pu.realname^+' {impl}'); recompile_reason:=rr_crcchanged; do_compile:=true; dispose(map); @@ -1172,7 +1172,10 @@ uses end. { $Log$ - Revision 1.7 2001-05-19 23:05:19 peter + Revision 1.8 2001-06-04 11:49:08 peter + * store used units in original type in ppu + + Revision 1.7 2001/05/19 23:05:19 peter * support uses in construction Revision 1.6 2001/05/19 21:08:59 peter