瀏覽代碼

* use cpu64

peter 21 年之前
父節點
當前提交
02d7fd9c1d
共有 5 個文件被更改,包括 29 次插入196 次删除
  1. 3 2
      rtl/linux/Makefile
  2. 3 1
      rtl/linux/Makefile.fpc
  3. 10 15
      rtl/linux/ctypes.inc
  4. 13 11
      rtl/linux/ptypes.inc
  5. 0 167
      rtl/linux/systypes.inc

+ 3 - 2
rtl/linux/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 1.1 [2004/04/21]
+# Don't edit, this file is generated by FPCMake Version 1.1 [2004/04/22]
 #
 default: all
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
@@ -1452,8 +1452,9 @@ math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
 gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
 	$(COMPILER) $(OBJPASDIR)/gettext.pp
 varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
-		    $(OBJPASDIR)/varutilh.inc varutils.pp
+		    $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT)
 	$(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
+variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT)
 types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $(OBJPASDIR)/types.pp
 sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)

+ 3 - 1
rtl/linux/Makefile.fpc

@@ -228,9 +228,11 @@ gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
         $(COMPILER) $(OBJPASDIR)/gettext.pp
 
 varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
-                    $(OBJPASDIR)/varutilh.inc varutils.pp
+                    $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT)
         $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
 
+variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT)
+
 types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) $(OBJPASDIR)/types.pp
 

+ 10 - 15
rtl/linux/ctypes.inc

@@ -3,7 +3,7 @@
     This file is part of the Free Pascal run time library.
     Copyright (c) 2001 by Free Pascal development team
 
-    Basic types for C interfacing. Check the 64-bit defines.    
+    Basic types for C interfacing. Check the 64-bit defines.
 
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
@@ -18,10 +18,6 @@
 {                       POSIX TYPE DEFINITIONS                          }
 {***********************************************************************}
 
-{ Introduced defines
-    - 64bitarch (for 64-bits Linux systems, test system was idefix
-}
-
 Type
     { the following type definitions are compiler dependant }
     { and system dependant                                  }
@@ -42,18 +38,14 @@ Type
     cuchar = byte;
     cInt   = longint;           { minimum range is : 32-bit    }
     cUInt  = Cardinal;          { minimum range is : 32-bit    }
-  {$ifdef 64bitarch}
+{$ifdef cpu64}
     cLong  = int64;
-  {$ifdef VER_1_0}
-    cuLong = int64;
-  {$else}
     cuLong = qword;
-   {$endif}
-  {$else}
+{$else}
     cLong  = longint;
     cuLong = Cardinal;
-  {$endif}
-    cshort = integer;
+{$endif}
+    cshort = smallint;
     cushort= word;
 
     pcInt   = ^cInt;
@@ -63,9 +55,12 @@ Type
     pcshort = ^cshort;
     pcushort= ^cushort;
 
-{ 
+{
    $Log$
-   Revision 1.3  2003-09-16 21:20:40  marco
+   Revision 1.4  2004-04-26 16:53:19  peter
+     * use cpu64
+
+   Revision 1.3  2003/09/16 21:20:40  marco
     * pointer's of some basetypes
 
    Revision 1.2  2002/12/18 16:43:26  marco

+ 13 - 11
rtl/linux/ptypes.inc

@@ -21,7 +21,6 @@
 {***********************************************************************}
 
 { Introduced defines
-    - 64bitarch (for 64-bits Linux systems, test system was idefix (in ctypes)
     - 64bitfs   (should be on if libc switches to a 64-bit system.
 
 All three tested systems (PPC,Alpha,2x i386) gave the same POSIX limits,
@@ -62,15 +61,15 @@ Type
     TnLink   = nlink_t;
     pnLink   = ^nlink_t;
 
-  {$ifdef 64BitArch}
+{$ifdef cpu64}
     off_t    = cint64;          { used for file sizes          }
-  {$else}
+{$else}
    {$ifdef 64BitFS}
     off_t    = cint64;
    {$else}
     off_t    = cint;
    {$endif}
-  {$endif}
+{$endif}
     TOff     = off_t;
     pOff     = ^off_t;
 
@@ -78,17 +77,17 @@ Type
     TPid     = pid_t;
     pPid     = ^pid_t;
 
-   {$ifdef 64bitarch}
+{$ifdef cpu64}
     size_t   = cuint64;         { as definied in the C standard}
     ssize_t  = cint64;          { used by function for returning number of bytes }
     clock_t  = cuint64;
     time_t   = cint64;           { used for returning the time  }
-   {$else}
+{$else}
     size_t   = cuint32;         { as definied in the C standard}
     ssize_t  = cint32;          { used by function for returning number of bytes }
     clock_t  = culong;
     time_t   = clong;           { used for returning the time  }
-   {$endif}
+{$endif}
     TSize     = size_t;
     pSize     = ^size_t;
     TSSize    = ssize_t;
@@ -129,7 +128,7 @@ Type
     bavail,            { Available free blocks to non-root users }
     files,             { File nodes in system }
     ffree,             { Free file nodes in system }
-    fsid,              { File system ID } 
+    fsid,              { File system ID }
     namelen : longint; { Maximum name length in system }
     spare   : array [0..6] of longint; { For later use }
   end;
@@ -144,14 +143,17 @@ CONST
     PATH_MAX       = 4095;     {255}   { Maximum number of bytes in pathname }
     SYS_NMLN       = 65;
 {$ifdef FPC_USE_LIBC}
-   SIG_MAXSIG      = 1024;	// highest signal version
+   SIG_MAXSIG      = 1024;      // highest signal version
 {$else}
-   SIG_MAXSIG      = 128;	// highest signal version
+   SIG_MAXSIG      = 128;       // highest signal version
 {$endif}
 
 {
    $Log$
-   Revision 1.8  2004-03-04 22:15:16  marco
+   Revision 1.9  2004-04-26 16:53:19  peter
+     * use cpu64
+
+   Revision 1.8  2004/03/04 22:15:16  marco
     * UnixType changes. Please report problems to me.
 
    Revision 1.7  2004/01/11 09:56:20  jonas

+ 0 - 167
rtl/linux/systypes.inc

@@ -1,167 +0,0 @@
-{
-    $Id$
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 1999-2000 by Michael Van Canneyt,
-    member of the Free Pascal development team.
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-{type}
-
-{
- Linux system calls take arguments as follows :
-
-   i386    m68k    ppc
-   %eax    %d0     r0      System call number
-   %ebx    %d1     r3      first argument
-   %ecx    %d2     r4      second argument
-   %edx    %d3     r5      third argumens
-   %esi    %d3     r6      fourth argument
-   %edi    %d4     r7      fifth argument
-
-}
-
-{
-  TStatfs = packed record
-    fstype,            { File system type }
-    bsize,             { Optimal block trensfer size }
-    blocks,            { Data blocks in system }
-    bfree,             { free blocks in system }
-    bavail,            { Available free blocks to non-root users }
-    files,             { File nodes in system }
-    ffree,             { Free file nodes in system }
-    fsid,              { File system ID }
-    namelen : longint; { Maximum name length in system }
-    spare   : array [0..6] of longint; { For later use }
-  end;
-  PStatFS=^TStatFS;
-}
-{
-{ The following are records for system calls }
-  dirent = packed record
-    ino,
-    off    : longint;
-    reclen : word;
-    name   : array [0..255] of char;
-  end;
-  pdirent =^dirent;
-  TDirEnt = dirent;
-
-  TDir = packed record
-    fd     : integer;
-    loc    : longint;
-    size   : integer;
-    buf    : pdirent;
-  {The following are used in libc, but NOT in the linux kernel sources ??}
-    nextoff: longint;
-    dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
-    lock   : pointer;
-  end;
-  PDir =^TDir;
-
-}
-{ can't put definition in stat.inc because stat.inc is also included in }
-{ bunxtype.inc, which is used together with ptypes.inc, which defines   }
-{ def_t in another way :(                                               }
-{
-{$ifdef cpui386}
-  dev_t = word;
-{$else cpui386}
-{$ifdef cpum68k}
-  dev_t = word;
-{$else cpum68k}
-{$ifdef cpupowerpc}
-  dev_t = cardinal;
-{$else cpupowerpc}
-{$ifdef cpusparc}
-  dev_t = cardinal;
-{$else cpusparc}
-{$error dev_t unknown for this processor}
-{$endif cpusparc}
-{$endif cpupowerpc}
-{$endif cpum68k}
-{$endif cpui386}
-}{
-{ definition of stat record type }
-{i stat.inc}
-  PStat=^Stat;
-  TStat=Stat;
-}
-
-{
-
-  fdSet=array[0..31] of longint;{=1024 bits}
-  pfdset=^fdset;
-  TFDSet=fdset;
-
-  timeval = packed record
-    sec,usec:longint
-  end;
-  ptimeval=^timeval;
-  TTimeVal=timeval;
-
-
-  timespec = packed record
-    tv_sec,tv_nsec:longint;
-  end;
-
-
-  timezone = packed record
-    minuteswest,dsttime:longint;
-  end;
-  ptimezone =^timezone;
-  TTimeZone = timezone;
-
-
-  utsname = packed record
-    sysname,
-    nodename,
-    release,
-    version,
-    machine,
-    domainname : Array[0..64] of char;
-  end;
-  PUTSName=^UTSName;
-  TUTSName=UTSName;
-}
-{
-  $Log$
-  Revision 1.14  2004-02-06 23:06:16  florian
-    - killed tsyscallregs
-
-  Revision 1.13  2004/01/11 09:56:20  jonas
-    * moved tstatfs from systypes.inc to ptypes.inc to fix make cycle with
-      -dFPC_USE_LIBC (systypes.inc is now completely commented out)
-
-  Revision 1.12  2003/09/14 20:15:01  marco
-   * Unix reform stage two. Remove all calls from Unix that exist in Baseunix.
-
-  Revision 1.11  2003/08/21 22:24:52  olle
-    - removed parameter from fpc_iocheck
-
-  Revision 1.10  2003/07/08 21:23:24  peter
-    * sparc fixes
-
-  Revision 1.9  2003/07/08 14:18:40  peter
-    * fdset changed to 1024 bits
-
-  Revision 1.8  2003/05/15 22:50:50  jonas
-    * the stat type is processor-dependent
-    * the dev_t tpye is processor dependent. Don't use it in the stat type
-      however, as that one is also used at a time where dev_t is already
-      defined as qword
-
-  Revision 1.7  2002/09/07 16:01:20  peter
-    * old logs removed and tabs fixed
-
-  Revision 1.6  2002/07/29 17:50:02  florian
-    + added register location description for ppc
-
-}
-