Skip to content
Snippets Groups Projects
Commit 27f674a9 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Share function declarations between varients

parent 19324c42
Branches
Tags
No related merge requests found
......@@ -1205,9 +1205,9 @@ int slapd_daemon( void )
}
#ifdef HAVE_WINSOCK2
int sockinit(void)
{
#if defined( HAVE_WINSOCK2 )
WORD wVersionRequested;
WSADATA wsaData;
int err;
......@@ -1237,40 +1237,22 @@ int sockinit(void)
}
/* The WinSock DLL is acceptable. Proceed. */
return 0;
}
int sockdestroy(void)
{
WSACleanup();
return 0;
}
#elif HAVE_WINSOCK
static int sockinit(void)
{
#elif defined( HAVE_WINSOCK )
WSADATA wsaData;
if ( WSAStartup( 0x0101, &wsaData ) != 0 ) {
return -1;
}
return 0;
}
static int sockdestroy(void)
{
WSACleanup();
#endif
return 0;
}
#else
static int sockinit(void)
{
return 0;
}
static int sockdestroy(void)
int sockdestroy(void)
{
#if defined( HAVE_WINSOCK2 ) || defined( HAVE_WINSOCK )
WSACleanup();
#endif
return 0;
}
#endif
RETSIGTYPE
slap_sig_shutdown( int sig )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment