Explorar o código

* added csize_t and pcsize_t for non unix systems (in unix/ctypes.pp)
* added csize_t = UnixTypes.size_t in ctypes.pp for unix systems.
* reason: size_t is a C type and it's often used by C header files. Several packages define their own size_t.

git-svn-id: trunk@12602 -

ivost %!s(int64=16) %!d(string=hai) anos
pai
achega
38bf32dddf
Modificáronse 3 ficheiros con 6 adicións e 3 borrados
  1. 2 3
      rtl/inc/ctypes.pp
  2. 2 0
      rtl/unix/aliasctp.inc
  3. 2 0
      rtl/unix/ctypes.inc

+ 2 - 3
rtl/inc/ctypes.pp

@@ -72,14 +72,13 @@ type
   culong                 = cardinal;           pculong                = ^culong;
   culong                 = cardinal;           pculong                = ^culong;
 {$endif}
 {$endif}
 
 
+  csize_t                = ptruint;            pcsize_t               = pptruint;
+
 // Kylix compat types
 // Kylix compat types
   u_long  = culong;
   u_long  = culong;
   u_short = cushort;
   u_short = cushort;
-
-
   coff_t = clong;
   coff_t = clong;
 
 
-
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}
   cfloat                 = single;             pcfloat                = ^cfloat;
   cfloat                 = single;             pcfloat                = ^cfloat;
   cdouble                = double;             pcdouble               = ^cdouble;
   cdouble                = double;             pcdouble               = ^cdouble;

+ 2 - 0
rtl/unix/aliasctp.inc

@@ -54,5 +54,7 @@ type
 //  clongdouble            = UnixType.clongdouble; pclongdouble           = UnixType.pclongdouble;
 //  clongdouble            = UnixType.clongdouble; pclongdouble           = UnixType.pclongdouble;
 {$endif}
 {$endif}
 
 
+  csize_t                = UnixType.size_t;      pcsize_t               = UnixType.psize_t;
+
   coff_t                 = UnixType.TOff;
   coff_t                 = UnixType.TOff;
 
 

+ 2 - 0
rtl/unix/ctypes.inc

@@ -65,3 +65,5 @@ type
   clongdouble            = extended;           pclongdouble           = ^clongdouble;
   clongdouble            = extended;           pclongdouble           = ^clongdouble;
 {$endif}
 {$endif}
 
 
+// csize_t is defined in the operatingsystem dependant ptypes.inc
+// csize_t               = ptruint;            pcsize_t               = pptruint;