openbsd-ports/security/tcltls/patches/patch-tlsBIO_c
2008-07-07 17:31:20 +00:00

60 lines
2.0 KiB
Plaintext

$OpenBSD: patch-tlsBIO_c,v 1.1 2008/07/07 17:31:20 steven Exp $
--- tlsBIO.c.orig Sun Jul 6 17:57:50 2008
+++ tlsBIO.c Sun Jul 6 17:59:47 2008
@@ -61,8 +61,8 @@ BioWrite (bio, buf, bufLen)
Tcl_Channel chan = Tls_GetParent((State*)(bio->ptr));
int ret;
- dprintf(stderr,"\nBioWrite(0x%x, <buf>, %d) [0x%x]",
- (unsigned int) bio, bufLen, (unsigned int) chan);
+ dprintf(stderr,"\nBioWrite(%p, <buf>, %d) [%p]",
+ bio, bufLen, chan);
if (channelTypeVersion == TLS_CHANNEL_VERSION_2) {
ret = Tcl_WriteRaw(chan, buf, bufLen);
@@ -70,8 +70,8 @@ BioWrite (bio, buf, bufLen)
ret = Tcl_Write(chan, buf, bufLen);
}
- dprintf(stderr,"\n[0x%x] BioWrite(%d) -> %d [%d.%d]",
- (unsigned int) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno());
+ dprintf(stderr,"\n[%p] BioWrite(%d) -> %d [%d.%d]",
+ chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno());
BIO_clear_flags(bio, BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY);
@@ -96,8 +96,8 @@ BioRead (bio, buf, bufLen)
Tcl_Channel chan = Tls_GetParent((State*)bio->ptr);
int ret = 0;
- dprintf(stderr,"\nBioRead(0x%x, <buf>, %d) [0x%x]",
- (unsigned int) bio, bufLen, (unsigned int) chan);
+ dprintf(stderr,"\nBioRead(%p, <buf>, %d) [%p]",
+ bio, bufLen, chan);
if (buf == NULL) return 0;
@@ -107,8 +107,8 @@ BioRead (bio, buf, bufLen)
ret = Tcl_Read(chan, buf, bufLen);
}
- dprintf(stderr,"\n[0x%x] BioRead(%d) -> %d [%d.%d]",
- (unsigned int) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno());
+ dprintf(stderr,"\n[%p] BioRead(%d) -> %d [%d.%d]",
+ chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno());
BIO_clear_flags(bio, BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY);
@@ -143,9 +143,8 @@ BioCtrl (bio, cmd, num, ptr)
long ret = 1;
int *ip;
- dprintf(stderr,"\nBioCtrl(0x%x, 0x%x, 0x%x, 0x%x)",
- (unsigned int) bio, (unsigned int) cmd, (unsigned int) num,
- (unsigned int) ptr);
+ dprintf(stderr,"\nBioCtrl(%p, 0x%x, 0x%lx, %p)",
+ bio, cmd, num, ptr);
switch (cmd) {
case BIO_CTRL_RESET: