Explorar o código

--- Merging r15627 into '.':
U rtl/inc/ctypes.pp

# revisions: 15627
------------------------------------------------------------------------
r15627 | jonas | 2010-07-23 17:44:15 +0200 (Fri, 23 Jul 2010) | 2 lines
Changed paths:
M /trunk/rtl/inc/ctypes.pp

* fixed compilation with Delphi (patch by Sven Barth, mantis #17016)

------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@17590 -

marco %!s(int64=14) %!d(string=hai) anos
pai
achega
58dede8ab1
Modificáronse 1 ficheiros con 10 adicións e 6 borrados
  1. 10 6
      rtl/inc/ctypes.pp

+ 10 - 6
rtl/inc/ctypes.pp

@@ -17,8 +17,10 @@
 
 
 unit ctypes;
 unit ctypes;
 
 
-{$inline on}
-{$define dummy}
+{$ifdef FPC}
+  {$inline on}
+  {$define dummy}
+{$endif}
 
 
 interface
 interface
 
 
@@ -30,6 +32,8 @@ uses unixtype;
 type
 type
 {$ifndef FPC}
 {$ifndef FPC}
     qword = int64;  // Keep h2pas "uses ctypes" headers working with delphi.
     qword = int64;  // Keep h2pas "uses ctypes" headers working with delphi.
+    ptruint = cardinal;
+    pptruint = ^ptruint;
 {$endif}
 {$endif}
 
 
   { the following type definitions are compiler dependant }
   { the following type definitions are compiler dependant }
@@ -71,7 +75,7 @@ type
   clong                  = longint;            pclong                 = ^clong;
   clong                  = longint;            pclong                 = ^clong;
   cslong                 = longint;            pcslong                = ^cslong;
   cslong                 = longint;            pcslong                = ^cslong;
   culong                 = cardinal;           pculong                = ^culong;
   culong                 = cardinal;           pculong                = ^culong;
-{$endif}
+{$ifend}
 
 
   csize_t                = ptruint;            pcsize_t               = pptruint;
   csize_t                = ptruint;            pcsize_t               = pptruint;
 
 
@@ -92,7 +96,7 @@ type
 
 
 {$if defined(linux) and (defined(cpupowerpc) or defined(cpuarm))}
 {$if defined(linux) and (defined(cpupowerpc) or defined(cpuarm))}
   {$define longdouble_is_double}
   {$define longdouble_is_double}
-{$endif}
+{$ifend}
 
 
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}
 {$ifdef longdouble_is_double}
 {$ifdef longdouble_is_double}
@@ -111,8 +115,8 @@ type
   {$else}
   {$else}
   {$define longdouble_assignment_overload_real128}
   {$define longdouble_assignment_overload_real128}
   clongdouble = packed array [0..15] of byte;
   clongdouble = packed array [0..15] of byte;
-  {$endif}
-{$endif}
+  {$ifend}
+{$ifend}
   Pclongdouble=^clongdouble;
   Pclongdouble=^clongdouble;
 
 
 {$ifdef longdouble_assignment_overload_real80}
 {$ifdef longdouble_assignment_overload_real80}