Index: tlsBIO.c ================================================================== --- tlsBIO.c +++ tlsBIO.c @@ -15,43 +15,35 @@ static int BioPuts _ANSI_ARGS_ ((BIO *h, CONST char *str)); static long BioCtrl _ANSI_ARGS_ ((BIO *h, int cmd, long arg1, void *ptr)); static int BioNew _ANSI_ARGS_ ((BIO *h)); static int BioFree _ANSI_ARGS_ ((BIO *h)); - -static BIO_METHOD BioMethods = { - BIO_TYPE_TCL, "tcl", - BioWrite, - BioRead, - BioPuts, - NULL, /* BioGets */ - BioCtrl, - BioNew, - BioFree, -}; - BIO * BIO_new_tcl(statePtr, flags) State *statePtr; int flags; { BIO *bio; + static BIO_METHOD BioMethods = { + .type = BIO_TYPE_TCL, + .name = "tcl", + .bwrite = BioWrite, + .bread = BioRead, + .bputs = BioPuts, + .ctrl = BioCtrl, + .create = BioNew, + .destroy = BioFree, + }; bio = BIO_new(&BioMethods); bio->ptr = (char*)statePtr; bio->init = 1; bio->shutdown = flags; return bio; } -BIO_METHOD * -BIO_s_tcl() -{ - return &BioMethods; -} - static int BioWrite (bio, buf, bufLen) BIO *bio; CONST char *buf; int bufLen; Index: tlsInt.h ================================================================== --- tlsInt.h +++ tlsInt.h @@ -252,9 +252,8 @@ EXTERN void Tls_Free _ANSI_ARGS_ ((char *blockPtr)); EXTERN void Tls_Clean _ANSI_ARGS_ ((State *statePtr)); EXTERN int Tls_WaitForConnect _ANSI_ARGS_(( State *statePtr, int *errorCodePtr)); -EXTERN BIO_METHOD * BIO_s_tcl _ANSI_ARGS_((void)); EXTERN BIO * BIO_new_tcl _ANSI_ARGS_((State* statePtr, int flags)); #endif /* _TLSINT_H */