Apply after the 1st one. This patch fixes crypto function in libc unit.

Ales
Index: crypth.inc
===================================================================
--- crypth.inc  (revision 1156)
+++ crypth.inc  (working copy)
@@ -1,9 +1,9 @@
 
 
 { defined earlier in unistdh.inc...
-function crypt(__key:Pchar; __salt:Pchar):Pchar;cdecl;external clib name 
'crypt';
-procedure setkey(__key:Pchar);cdecl;external clib name 'setkey';
-procedure encrypt(__block:Pchar; __edflag:longint);cdecl;external clib name 
'encrypt';
+function crypt(__key:Pchar; __salt:Pchar):Pchar;cdecl;external cryptlib name 
'crypt';
+procedure setkey(__key:Pchar);cdecl;external cryptlib name 'setkey';
+procedure encrypt(__block:Pchar; __edflag:longint);cdecl;external cryptlib 
name 'encrypt';
 }
 type
    Pcrypt_data = ^crypt_data;
@@ -20,9 +20,9 @@
         initialized : longint;
      end;
 
-function crypt_r(__key:Pchar; __salt:Pchar; 
__data:Pcrypt_data):Pchar;cdecl;external clib name 'crypt_r';
-procedure setkey_r(__key:Pchar; __data:Pcrypt_data);cdecl;external clib name 
'setkey_r';
-procedure encrypt_r(__block:Pchar; __edflag:longint; 
__data:Pcrypt_data);cdecl;external clib name 'encrypt_r';
+function crypt_r(__key:Pchar; __salt:Pchar; 
__data:Pcrypt_data):Pchar;cdecl;external cryptlib name 'crypt_r';
+procedure setkey_r(__key:Pchar; __data:Pcrypt_data);cdecl;external cryptlib 
name 'setkey_r';
+procedure encrypt_r(__block:Pchar; __edflag:longint; 
__data:Pcrypt_data);cdecl;external cryptlib name 'encrypt_r';
 
 { ---------------------------------------------------------------------
     Borland compatibility types
Index: dlfcnh.inc
===================================================================
--- dlfcnh.inc  (revision 1156)
+++ dlfcnh.inc  (working copy)
@@ -3,10 +3,10 @@
   RTLD_NEXT = Pointer(-1);
   RTLD_DEFAULT = nil;
 
-function dlopen(__file:Pchar; __mode:longint):pointer;cdecl;external clib name 
'dlopen';
-function dlclose(__handle:pointer):longint;cdecl;external clib name 'dlclose';
-function dlsym(__handle:pointer; __name:Pchar):pointer;cdecl;external clib 
name 'dlsym';
-function dlvsym(__handle:pointer; __name:Pchar; 
__version:Pchar):pointer;cdecl;external clib name 'dlvsym';
+function dlopen(__file:Pchar; __mode:longint):pointer;cdecl;external dllib 
name 'dlopen';
+function dlclose(__handle:pointer):longint;cdecl;external dllib name 'dlclose';
+function dlsym(__handle:pointer; __name:Pchar):pointer;cdecl;external dllib 
name 'dlsym';
+function dlvsym(__handle:pointer; __name:Pchar; 
__version:Pchar):pointer;cdecl;external dllib name 'dlvsym';
 function dlerror:Pchar;cdecl;external clib name 'dlerror';
 
 type
@@ -19,7 +19,7 @@
         dli_saddr : pointer;
      end;
 
-function dladdr(__address:pointer; __info:PDl_info):longint;cdecl;external 
clib name 'dladdr';
+function dladdr(__address:pointer; __info:PDl_info):longint;cdecl;external 
dllib name 'dladdr';
 
 { ---------------------------------------------------------------------
     Borland compatibility types
@@ -29,5 +29,5 @@
   TDLInfo = Dl_info;
   PDLInfo = ^TDLInfo;
 
-function dladdr(__address:pointer; var __info: Dl_info):longint;cdecl;external 
clib name 'dladdr';
+function dladdr(__address:pointer; var __info: Dl_info):longint;cdecl;external 
dllib name 'dladdr';
 
Index: libc.pp
===================================================================
--- libc.pp     (revision 1156)
+++ libc.pp     (working copy)
@@ -9,6 +9,8 @@
 
 Const
   clib = 'c';
+  dllib = 'dl';
+  cryptlib = 'crypt';
   threadslib = 'pthread';
 
 {$i glue.inc}           // C to Pascal type mappings
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to