Netware-specific changes,

PR: 780
Submitted by: Verdon Walker <VWalker@novell.com>
Reviewed by: Richard Levitte
This commit is contained in:
Richard Levitte
2003-11-28 13:10:58 +00:00
parent 4c8b4f9d03
commit 4d8743f490
67 changed files with 3490 additions and 43 deletions

View File

@@ -79,7 +79,7 @@
#define MAX_LISTEN 32
#endif
#ifdef OPENSSL_SYS_WINDOWS
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
static int wsa_init_done=0;
#endif
@@ -473,6 +473,31 @@ int BIO_sock_init(void)
if (sock_init())
return (-1);
#endif
#if defined(OPENSSL_SYS_NETWARE)
WORD wVerReq;
WSADATA wsaData;
int err;
if (!wsa_init_done)
{
# ifdef SIGINT
signal(SIGINT,(void (*)(int))BIO_sock_cleanup);
# endif
wsa_init_done=1;
wVerReq = MAKEWORD( 2, 0 );
err = WSAStartup(wVerReq,&wsaData);
if (err != 0)
{
SYSerr(SYS_F_WSASTARTUP,err);
BIOerr(BIO_F_BIO_SOCK_INIT,BIO_R_WSASTARTUP);
return(-1);
}
}
#endif
return(1);
}
@@ -487,6 +512,12 @@ void BIO_sock_cleanup(void)
#endif
WSACleanup();
}
#elif defined(OPENSSL_SYS_NETWARE)
if (wsa_init_done)
{
wsa_init_done=0;
WSACleanup();
}
#endif
}