소스 검색

* SharedSuffix

git-svn-id: trunk@10825 -
marco 17 년 전
부모
커밋
03c02a17e9
1개의 변경된 파일17개의 추가작업 그리고 1개의 파일을 삭제
  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
 
 { ---------------------------------------------------------------------