Fix for bad sorting of object names.
[oweals/openssl.git] / crypto / bio / bss_rtcp.c
index e07958cd77bc9f534f87d41af69fbdfc85c4c537..1a0078ad6e161793bf2592c5b926d06d1a468114 100644 (file)
@@ -58,6 +58,7 @@
 
 /* Written by David L. Jones <jonesd@kcgl1.eng.ohio-state.edu>
  * Date:   22-JUL-1996
+ * Revised: 25-SEP-1997                Update for 0.8.1, BIO_CTRL_SET -> BIO_C_SET_FD
  */
 /* VMS */
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include "cryptlib.h"
-#include "bio.h"
+#include <openssl/bio.h>
 
 #include <iodef.h>             /* VMS IO$_ definitions */
-extern int SYS$QIOW();
+#include <starlet.h>
+
 typedef unsigned short io_channel;
 /*************************************************************************/
 struct io_status { short status, count; long flags; };
@@ -105,6 +107,7 @@ static BIO_METHOD rtcp_method=
        rtcp_ctrl,
        rtcp_new,
        rtcp_free,
+       NULL,
        };
 
 BIO_METHOD *BIO_s_rtcp(void)
@@ -114,11 +117,17 @@ BIO_METHOD *BIO_s_rtcp(void)
 /*****************************************************************************/
 /* Decnet I/O routines.
  */
+
+#ifdef __DECC
+#pragma message save
+#pragma message disable DOLLARID
+#endif
+
 static int get ( io_channel chan, char *buffer, int maxlen, int *length )
 {
     int status;
     struct io_status iosb;
-    status = SYS$QIOW ( 0, chan, IO$_READVBLK, &iosb, 0, 0,
+    status = sys$qiow ( 0, chan, IO$_READVBLK, &iosb, 0, 0,
        buffer, maxlen, 0, 0, 0, 0 );
     if ( (status&1) == 1 ) status = iosb.status;
     if ( (status&1) == 1 ) *length = iosb.count;
@@ -129,11 +138,16 @@ static int put ( io_channel chan, char *buffer, int length )
 {
     int status;
     struct io_status iosb;
-    status = SYS$QIOW ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0,
+    status = sys$qiow ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0,
        buffer, length, 0, 0, 0, 0 );
     if ( (status&1) == 1 ) status = iosb.status;
     return status;
 }
+
+#ifdef __DECC
+#pragma message restore
+#endif
+
 /***************************************************************************/
 
 static int rtcp_new(BIO *bi)
@@ -142,7 +156,7 @@ static int rtcp_new(BIO *bi)
        bi->init=1;
        bi->num=0;
        bi->flags = 0;
-       bi->ptr=Malloc(sizeof(struct rpc_ctx));
+       bi->ptr=OPENSSL_malloc(sizeof(struct rpc_ctx));
        ctx = (struct rpc_ctx *) bi->ptr;
        ctx->filled = 0;
        ctx->pos = 0;
@@ -152,7 +166,7 @@ static int rtcp_new(BIO *bi)
 static int rtcp_free(BIO *a)
 {
        if (a == NULL) return(0);
-       if ( a->ptr ) Free ( a->ptr );
+       if ( a->ptr ) OPENSSL_free ( a->ptr );
        a->ptr = NULL;
        return(1);
 }
@@ -243,7 +257,7 @@ static long rtcp_ctrl(BIO *b, int cmd, long num, char *ptr)
        case BIO_CTRL_EOF:
                ret = 1;
                break;
-       case BIO_CTRL_SET:
+       case BIO_C_SET_FD:
                b->num = num;
                ret = 1;
                break;