diff --git a/basis/checksums/openssl/openssl.factor b/basis/checksums/openssl/openssl.factor index 673500b62a..bc70230fd0 100644 --- a/basis/checksums/openssl/openssl.factor +++ b/basis/checksums/openssl/openssl.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors byte-arrays alien.c-types alien.data kernel continuations destructors sequences io openssl openssl.libcrypto -checksums checksums.stream ; +checksums checksums.stream classes.struct ; IN: checksums.openssl ERROR: unknown-digest name ; @@ -23,7 +23,7 @@ TUPLE: evp-md-context < disposable handle ; : ( -- ctx ) evp-md-context new-disposable - "EVP_MD_CTX" dup EVP_MD_CTX_init >>handle ; + EVP_MD_CTX dup EVP_MD_CTX_init >>handle ; M: evp-md-context dispose* handle>> EVP_MD_CTX_cleanup drop ; diff --git a/basis/io/sockets/secure/openssl/openssl.factor b/basis/io/sockets/secure/openssl/openssl.factor index 6d01a66cf0..400a44ea02 100644 --- a/basis/io/sockets/secure/openssl/openssl.factor +++ b/basis/io/sockets/secure/openssl/openssl.factor @@ -31,7 +31,7 @@ TUPLE: openssl-context < secure-context aliens sessions ; ] [ drop ] if ; : password-callback ( -- alien ) - "int" { "void*" "int" "bool" "void*" } "cdecl" + int { void* int bool void* } "cdecl" [| buf size rwflag password! | password [ B{ 0 } password! ] unless diff --git a/basis/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor index 0eba1d2854..df9955a53c 100644 --- a/basis/openssl/libcrypto/libcrypto.factor +++ b/basis/openssl/libcrypto/libcrypto.factor @@ -5,8 +5,8 @@ ! ! export LD_LIBRARY_PATH=/opt/local/lib -USING: alien alien.syntax combinators kernel system -alien.libraries ; +USING: alien alien.c-types alien.syntax combinators kernel system +alien.libraries classes.struct ; IN: openssl.libcrypto @@ -20,35 +20,35 @@ IN: openssl.libcrypto } cond >> -C-STRUCT: bio-method - { "int" "type" } - { "void*" "name" } - { "void*" "bwrite" } - { "void*" "bread" } - { "void*" "bputs" } - { "void*" "bgets" } - { "void*" "ctrl" } - { "void*" "create" } - { "void*" "destroy" } - { "void*" "callback-ctrl" } ; +STRUCT: bio-method + { type int } + { name void* } + { bwrite void* } + { bread void* } + { bputs void* } + { bgets void* } + { ctrl void* } + { create void* } + { destroy void* } + { callback-ctrl void* } ; -C-STRUCT: bio - { "void*" "method" } - { "void*" "callback" } - { "void*" "cb-arg" } - { "int" "init" } - { "int" "shutdown" } - { "int" "flags" } - { "int" "retry-reason" } - { "int" "num" } - { "void*" "ptr" } - { "void*" "next-bio" } - { "void*" "prev-bio" } - { "int" "references" } - { "ulong" "num-read" } - { "ulong" "num-write" } - { "void*" "crypto-ex-data-stack" } - { "int" "crypto-ex-data-dummy" } ; +STRUCT: bio + { method void* } + { callback void* } + { cb-arg void* } + { init int } + { shutdown int } + { flags int } + { retry-reason int } + { num int } + { ptr void* } + { next-bio void* } + { prev-bio void* } + { references int } + { num-read ulong } + { num-write ulong } + { crypto-ex-data-stack void* } + { crypto-ex-data-dummy int } ; CONSTANT: BIO_NOCLOSE HEX: 00 CONSTANT: BIO_CLOSE HEX: 01 @@ -103,11 +103,11 @@ FUNCTION: void* BIO_f_buffer ( ) ; CONSTANT: EVP_MAX_MD_SIZE 64 -C-STRUCT: EVP_MD_CTX - { "EVP_MD*" "digest" } - { "ENGINE*" "engine" } - { "ulong" "flags" } - { "void*" "md_data" } ; +STRUCT: EVP_MD_CTX + { digest EVP_MD* } + { engine ENGINE* } + { flags ulong } + { md_data void* } ; TYPEDEF: void* EVP_MD* TYPEDEF: void* ENGINE*