diff --git a/compiler/globals.pas b/compiler/globals.pas index 9e1685baa1..f1709d401a 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -192,7 +192,6 @@ interface {$IFDEF testvarsets} Initsetalloc, {0=fixed, 1 =var} {$ENDIF} - initpackrecords, initpackenum : shortint; initalignment : talignmentinfo; initoptprocessor, @@ -708,16 +707,16 @@ implementation FixFileName[0]:=s[0]; end; - {Translates a unix or dos path to a mac path for use in MPW. - If already a mac path, it does nothing. The origin of this + {Translates a unix or dos path to a mac path for use in MPW. + If already a mac path, it does nothing. The origin of this algorithm will be put in macos/dos.pp, please update this from that, because there is some flaws in the algo below.} procedure TranslatePathToMac (var path: string); - + var slashPos, oldpos, newpos, oldlen: Integer; inname: Boolean; - + begin slashPos := Pos('/', path); if (slashPos <> 0) then {its a unix path} @@ -726,7 +725,7 @@ implementation begin Delete(path,1,1); Insert('{Boot}', path, 1); - end + end else {its a partial path} Insert('/', path, 1); end @@ -739,7 +738,7 @@ implementation begin Delete(path,1,1); Insert('{Boot}', path, 1); - end + end else if (Length(path) >= 2) and (path[2] = ':') then {its a full path, with drive letter} begin Delete(path, 1, 2); @@ -749,7 +748,7 @@ implementation Insert('/', path, 1); end; end; - + if (slashPos <> 0) then {its a unix or dos path} begin {Translate "/../" to "::" , "/./" to ":" and "/" to ":" ) in place. } @@ -761,7 +760,7 @@ implementation begin oldpos := oldpos + 1; case path[oldpos] of - '.': + '.': if (((oldpos < oldlen) and (path[oldpos + 1] in ['.', '/', '\'])) or (oldpos = oldlen)) and not inname then begin {its really a lonely ".." or "."} {Skip two chars in any case. } @@ -776,7 +775,7 @@ implementation newpos := newpos + 1; path[newpos] := path[oldpos]; end; - '/', '\': + '/', '\': begin inname := false; newpos := newpos + 1; @@ -1836,7 +1835,6 @@ implementation initfputype:=fpu_x87; - initpackrecords:=4; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; @@ -1845,7 +1843,6 @@ implementation {$endif i386} {$ifdef m68k} initoptprocessor:=MC68020; - initpackrecords:=2; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; @@ -1853,7 +1850,6 @@ implementation {$endif m68k} {$ifdef powerpc} initoptprocessor:=PPC604; - initpackrecords:=4; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; @@ -1862,14 +1858,12 @@ implementation {$endif powerpc} {$ifdef sparc} initoptprocessor:=SPARC_V8; - initpackrecords:=8; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; {$ENDIF} {$endif sparc} {$ifdef arm} - initpackrecords:=4; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; @@ -1882,7 +1876,6 @@ implementation initfputype:=fpu_sse64; - initpackrecords:=8; initpackenum:=4; {$IFDEF testvarsets} initsetalloc:=0; @@ -1904,7 +1897,12 @@ implementation end. { $Log$ - Revision 1.125 2004-02-19 20:40:15 olle + Revision 1.126 2004-03-14 20:08:37 peter + * packrecords fixed for settings from $PACKRECORDS + * default packrecords now uses value 0 and uses info from aligment + structure only, initpackrecords removed + + Revision 1.125 2004/02/19 20:40:15 olle + Support for Link on target especially for MacOS + TLinkerMPW + TAsmScriptMPW diff --git a/compiler/parser.pas b/compiler/parser.pas index b6843a9fd7..f5e462fb24 100644 --- a/compiler/parser.pas +++ b/compiler/parser.pas @@ -483,7 +483,7 @@ implementation aktalignment:=initalignment; aktfputype:=initfputype; aktpackenum:=initpackenum; - aktpackrecords:=initpackrecords; + aktpackrecords:=0; aktoutputformat:=initoutputformat; set_target_asm(aktoutputformat); aktoptprocessor:=initoptprocessor; @@ -698,7 +698,12 @@ implementation end. { $Log$ - Revision 1.61 2004-03-02 17:32:12 florian + Revision 1.62 2004-03-14 20:08:37 peter + * packrecords fixed for settings from $PACKRECORDS + * default packrecords now uses value 0 and uses info from aligment + structure only, initpackrecords removed + + Revision 1.61 2004/03/02 17:32:12 florian * make cycle fixed + pic support for darwin + support of importing vars from shared libs on darwin implemented diff --git a/compiler/scandir.pas b/compiler/scandir.pas index b30ec2d65b..87e9ad9fe7 100644 --- a/compiler/scandir.pas +++ b/compiler/scandir.pas @@ -605,7 +605,7 @@ implementation aktpackrecords:=-1 else if (hs='NORMAL') or (hs='DEFAULT') then - aktpackrecords:=2 + aktpackrecords:=0 else Message(scan_w_only_pack_records); end @@ -992,7 +992,12 @@ implementation end. { $Log$ - Revision 1.30 2004-01-28 22:16:31 peter + Revision 1.31 2004-03-14 20:08:37 peter + * packrecords fixed for settings from $PACKRECORDS + * default packrecords now uses value 0 and uses info from aligment + structure only, initpackrecords removed + + Revision 1.30 2004/01/28 22:16:31 peter * more record alignment fixes Revision 1.29 2003/12/25 01:07:09 florian diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 0fb3014d18..48374aea10 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1019,7 +1019,13 @@ implementation if (usefieldalignment=-1) then varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.maxCrecordalign) else - varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.recordalignmax); + if (usefieldalignment=0) then + varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.recordalignmax) + else + begin + { packrecords is set explicit, ignore recordalignmax limit } + varalignrecord:=used_align(varalign,aktalignment.recordalignmin,varalign); + end; recordalignment:=max(recordalignment,varalignrecord); end; @@ -2296,7 +2302,12 @@ implementation end. { $Log$ - Revision 1.143 2004-03-09 20:45:04 peter + Revision 1.144 2004-03-14 20:08:37 peter + * packrecords fixed for settings from $PACKRECORDS + * default packrecords now uses value 0 and uses info from aligment + structure only, initpackrecords removed + + Revision 1.143 2004/03/09 20:45:04 peter * more stabs updates Revision 1.142 2004/03/08 22:07:47 peter