Parcourir la source

* SharedSuffix

git-svn-id: trunk@10825 -
marco il y a 17 ans
Parent
commit
03c02a17e9
1 fichiers modifiés avec 17 ajouts et 1 suppressions
  1. 17 1
      rtl/inc/dynlibs.pas

+ 17 - 1
rtl/inc/dynlibs.pas

@@ -45,7 +45,23 @@ Function GetProcAddress(Lib : TlibHandle; ProcName : AnsiString) : Pointer;
 
 Type
   HModule = TLibHandle; 
-  
+
+// these are for easier crossplatform construction of dll names in dynloading libs.
+Const
+ {$ifdef Windows}
+  SharedSuffix  = 'dll';
+ {$else}
+   {$ifdef Darwin}
+     SharedSuffix = 'dylib';
+   {$else}
+     {$ifdef OS2}
+       SharedSuffix = 'dll';
+     {$else}
+       SharedSuffix = 'so';  
+     {$endif}
+   {$endif}
+ {$endif}      
+      
 Implementation
 
 { ---------------------------------------------------------------------