瀏覽代碼

macos: build fixes (powerpc), system unit at least should build now, after an IE in the MPW assembler writer is fixed

git-svn-id: trunk@36880 -
Károly Balogh 8 年之前
父節點
當前提交
fa9a34f738
共有 3 個文件被更改,包括 15 次插入10 次删除
  1. 6 5
      rtl/macos/macostp.inc
  2. 2 2
      rtl/macos/macutils.inc
  3. 7 3
      rtl/macos/sysfile.inc

+ 6 - 5
rtl/macos/macostp.inc

@@ -41,12 +41,13 @@ type
   SignedByte = shortint;
   SignedBytePtr = ^SignedByte;
 
-  SInt8                               = -128..127;
-  SInt16                              = INTEGER;
+  SInt8                               = ShortInt; //-128..127;
+  SInt16                              = SmallInt; // INTEGER;
   SInt32                              = LONGINT;
-  UInt8                               = 0..255;
-  UInt16                              = WORD;
-  UInt32                              = LONGWORD;
+  // Overlapping types are now declared in the System unit (KB)
+  //UInt8                               = 0..255;
+  //UInt16                              = WORD;
+  //UInt32                              = LONGWORD;
 
   IntegerPtr              = ^INTEGER;
   LongIntPtr              = ^LONGINT;

+ 2 - 2
rtl/macos/macutils.inc

@@ -334,7 +334,7 @@ end;
  a path to the directory, where the file or directory is located,
  is returned. Functioning even with System 6.}
 
-function FSpGetFullPath (spec: FSSpec; var fullPath: AnsiString;
+function FSpGetFullPath (spec: FSSpec; var fullPath: RawByteString;
   parent: Boolean): OSErr;
 
   var
@@ -406,7 +406,7 @@ begin
     PathArgToFSSpec := 3; {Empty paths are invalid paths}
 end;
 
-function PathArgToFullPath(s: string; var fullpath: AnsiString): Integer;
+function PathArgToFullPath(s: string; var fullpath: RawByteString): Integer;
 
 var
   err: OSErr;

+ 7 - 3
rtl/macos/sysfile.inc

@@ -65,8 +65,10 @@ end;
 
 procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
 var
-  s1,s2: AnsiString;
+  s1,s2: RawByteString;
 begin
+  s1:=''; { to fix warnings }
+  s2:='';
   {$ifdef MACOS_USE_STDCLIB}
   InOutRes:= PathArgToFullPath(p1, s1);
   if InOutRes <> 0 then
@@ -216,7 +218,7 @@ var
   fh: Longint;
 
   oflags : longint;
-  fullPath: AnsiString;
+  fullPath: RawByteString;
 
   finderInfo: FInfo;
 
@@ -307,7 +309,9 @@ begin
   Errno2InOutRes;
   if fh <> -1 then
     begin
-      if FileRec(f).mode in [fmoutput, fminout, fmappend] then
+      if (FileRec(f).mode = fmOutput) or
+         (FileRec(f).mode = fmInout) or
+         (FileRec(f).mode = fmAppend) then
         begin
           {Change of filetype and creator is always done when a file is opened
           for some kind of writing. This ensures overwritten Darwin files will