X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbio%2Fbss_acpt.c;h=9afa6364069d9f7ac78f5cfb2c8a2bb4e657680c;hb=3167f68faf4cd8f2a29b48785dc8e59ba0a2d25c;hp=a179dfa3dd486aec2c971e66b7d05444f8915dbb;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd;p=oweals%2Fopenssl.git diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index a179dfa3dd..9afa636406 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -62,9 +62,7 @@ #include #define USE_SOCKETS #include "cryptlib.h" -#include "bio.h" - -/* BIOerr(BIO_F_WSASTARTUP,BIO_R_WSASTARTUP ); */ +#include #ifdef WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ @@ -72,6 +70,11 @@ #define SOCKET_PROTOCOL IPPROTO_TCP #endif +#if (defined(VMS) && __VMS_VER < 70000000) +/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ +#undef FIONBIO +#endif + typedef struct bio_accept_st { int state; @@ -89,36 +92,17 @@ typedef struct bio_accept_st BIO *bio_chain; } BIO_ACCEPT; -#ifndef NOPROTO static int acpt_write(BIO *h,char *buf,int num); static int acpt_read(BIO *h,char *buf,int size); static int acpt_puts(BIO *h,char *str); static long acpt_ctrl(BIO *h,int cmd,long arg1,char *arg2); static int acpt_new(BIO *h); static int acpt_free(BIO *data); -#else -static int acpt_write(); -static int acpt_read(); -static int acpt_puts(); -static long acpt_ctrl(); -static int acpt_new(); -static int acpt_free(); -#endif - -#ifndef NOPROTO static int acpt_state(BIO *b, BIO_ACCEPT *c); static void acpt_close_socket(BIO *data); BIO_ACCEPT *BIO_ACCEPT_new(void ); void BIO_ACCEPT_free(BIO_ACCEPT *a); -#else - -static int acpt_state(); -static void acpt_close_socket(); -BIO_ACCEPT *BIO_ACCEPT_new(); -void BIO_ACCEPT_free(); -#endif - #define ACPT_S_BEFORE 1 #define ACPT_S_GET_ACCEPT_SOCKET 2 #define ACPT_S_OK 3 @@ -134,6 +118,7 @@ static BIO_METHOD methods_acceptp= acpt_ctrl, acpt_new, acpt_free, + NULL, }; BIO_METHOD *BIO_s_accept(void) @@ -308,7 +293,7 @@ static int acpt_read(BIO *b, char *out, int outl) int ret=0; BIO_ACCEPT *data; - BIO_clear_retry_flags(b); + BIO_clear_retry_flags(b); data=(BIO_ACCEPT *)b->ptr; while (b->next_bio == NULL)