Browse Source

* proper definition of O_LARGEFILE for all cpu platforms

git-svn-id: trunk@8120 -
florian 18 years ago
parent
commit
6250a3ccb9
1 changed files with 19 additions and 6 deletions
  1. 19 6
      rtl/linux/ostypes.inc

+ 19 - 6
rtl/linux/ostypes.inc

@@ -181,7 +181,7 @@ CONST
     O_RDONLY  =          0;        { Open read-only.  }
     O_WRONLY  =          1;        { Open write-only. }
     O_RDWR    =          2;        { Open read/write. }
-{$ifdef sparc}
+{$ifdef cpusparc}
     O_APPEND  =          8;
     O_CREAT   =       $200;
     O_TRUNC   =       $400;
@@ -192,9 +192,8 @@ CONST
     O_NOCTTY  =      $8000;
     O_DIRECTORY =   $10000;
     O_NOFOLLOW =    $20000;
-    O_LARGEFILE =   $40000;
     O_DIRECT  =    $100000;
-{$else sparc}
+{$else cpusparc}
     O_CREAT   =        $40;
     O_EXCL    =        $80;
     O_NOCTTY  =       $100;
@@ -204,11 +203,25 @@ CONST
     O_NDELAY  =     O_NONBLOCK;
     O_SYNC    =      $1000;
     O_DIRECT  =      $4000;
-    O_LARGEFILE =    $8000;
     O_DIRECTORY =   $10000;
     O_NOFOLLOW =    $20000;
-{$endif sparc}
+{$endif cpusparc}
 
+{$if defined(cpuarm) or defined(cpualpha) or defined(cpublackfin) or defined(cpum68k)}
+    O_LARGEFILE =   $20000;
+{$endif}
+{$if defined(cpusparc) or defined(cpusparc64)}
+    O_LARGEFILE =   $40000;
+{$endif}
+{$if defined(cpui386) or defined(cpux86_64) or defined(cpupowerpc) or defined(cpuia64)}
+    O_LARGEFILE =    $8000;
+{$endif}
+{$if defined(cpumips)}
+    O_LARGEFILE =    $2000;
+{$endif}
+{$if defined(cpupowerpc)}
+    O_LARGEFILE =    $2000;
+{$endif}
     { mode_t possible values                                 }
     S_IRUSR =  %0100000000;     { Read permission for owner   }
     S_IWUSR =  %0010000000;     { Write permission for owner  }
@@ -287,7 +300,7 @@ const
   { FP exception related constants for prctl(); PowerPC specific }
   PR_GET_FPEXC    = 11;   { get floating point exception mode }
   PR_SET_FPEXC    = 12;   { set floating point exception mode }
-  
+
   PR_FP_EXC_DISABLED = 0; { FP exceptions disabled }
   PR_FP_EXC_NONREC   = 1; { async non-recoverable exc. mode }
   PR_FP_EXC_ASYNC    = 2; { async recoverable exc. mode }