> appro> My vote is #5 for crypto/mem_dbg.c, crypto/bio/bss_conn.c,
> appro> ssl/s3_lib.c with new calls and separate ctl codes for binary
> appro> compatibility (I can fix up bss_conn.c and s3_lib.c to *show*
> appro> what I mean). I'll be back about o_names.c...
Below is what I ment for bss_conn.c. It's both source and binary
compatible and those are the *only* changes required. If everybody
agrees on it, I'll fix-up s3_lib.c in same way directly in cvs tree
(throwing some extra comments around and "promoting" even
*_get_info_callback to call for consistency:-) Cheers. Andy.
*** ./bio.h.orig Mon Sep 27 16:00:09 1999
--- ./bio.h Thu Jan 20 16:57:00 2000
***************
*** 116,121 ****
--- 116,122 ----
/* callback is int cb(BIO *bio,state,ret); */
#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */
#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */
+ #define BIO_CTRL_ANSI_SET_CALLBACK 16 /* opt - set callback function */
#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */
***************
*** 456,462 ****
--- 457,467 ----
size_t BIO_ctrl_wpending(BIO *b);
#define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(char
*)cbp)
+ #if 0
#define BIO_set_info_callback(b,cb) (int)BIO_ctrl(b,BIO_CTRL_SET_CALLBACK,0,(char
*)cb)
+ #else
+ int BIO_set_info_callback (BIO *b, int (*cb)());
+ #endif
/* For the BIO_f_buffer() type */
#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
*** ./bss_conn.c.orig Thu Jun 10 19:00:10 1999
--- ./bss_conn.c Thu Jan 20 16:54:36 2000
***************
*** 447,452 ****
--- 447,454 ----
return(ret);
}
+ typedef union { int (*func) (); void *ptr; } sin_of_ansification;
+
static long conn_ctrl(BIO *b, int cmd, long num, char *ptr)
{
BIO *dbio;
***************
*** 573,579 ****
(void)BIO_set_info_callback(dbio,data->info_callback);
break;
case BIO_CTRL_SET_CALLBACK:
! data->info_callback=(int (*)())ptr;
break;
case BIO_CTRL_GET_CALLBACK:
{
--- 575,587 ----
(void)BIO_set_info_callback(dbio,data->info_callback);
break;
case BIO_CTRL_SET_CALLBACK:
! if (sizeof(void (*)()) == sizeof(void *))
! {
! sin_of_ansification sin;
! sin.ptr = ptr;
! data->info_callback=sin.func;
! }
! else abort ();
break;
case BIO_CTRL_GET_CALLBACK:
{
***************
*** 583,588 ****
--- 591,599 ----
*fptr=data->info_callback;
}
break;
+ case BIO_CTRL_ANSI_SET_CALLBACK:
+ data->info_callback=((sin_of_ansification *)ptr)->func;
+ break;
default:
ret=0;
break;
***************
*** 614,618 ****
--- 625,636 ----
}
}
+ int BIO_set_info_callback (BIO *b, int (*cb)())
+ {
+ sin_of_ansification not_a_sin;
+
+ not_a_sin.func = cb;
+ return BIO_ctrl (b,BIO_CTRL_ANSI_SET_CALLBACK,0,(void *)¬_a_sin);
+ }
#endif
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]