diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-09-15 16:17:31 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-09-15 16:17:31 +0200 |
commit | 32ab9f94ebbfcc1528e18db8f7ae650b49b6007e (patch) | |
tree | b918df19a0d10bf76b389c92d67efba76e8eaad4 /src/biruda.c | |
parent | f370e929588815ebb19e5d9c49c24a224f320b10 (diff) | |
download | biruda-32ab9f94ebbfcc1528e18db8f7ae650b49b6007e.tar.gz biruda-32ab9f94ebbfcc1528e18db8f7ae650b49b6007e.tar.bz2 |
WSAStartup and WSACleanup are called properly in nanomsg library, removed
them from biruda.c
Diffstat (limited to 'src/biruda.c')
-rw-r--r-- | src/biruda.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/biruda.c b/src/biruda.c index 535c49f..952e09c 100644 --- a/src/biruda.c +++ b/src/biruda.c @@ -1,10 +1,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef _WIN32 -#include <Winsock2.h> -#include <ws2tcpip.h> -#else +#ifndef _WIN32 #include <errno.h> #include <unistd.h> #endif @@ -180,30 +177,12 @@ int main( int argc, char *argv[] ) return( ( test_config( &args_info ) == 0 ) ? EXIT_SUCCESS : EXIT_FAILURE ); } -#ifdef _WIN32 - WORD version; - WSADATA data; - int rc; - - version = MAKEWORD( 2, 2 ); - rc = WSAStartup( version, &data ); - if( rc != 0 ) { - fprintf( stderr, "ERROR: WSAStartup failed with error: %d\n", rc ); - cfg_free( cfg ); - cmdline_parser_free( &args_info ); - exit( EXIT_FAILURE ); - } -#endif - unsigned int has_master = cfg_size( cfg, "master" ); if( has_master ) { if( create_master( cfg ) != 0 ) { fprintf( stderr, "FATAL: Unable to create master thread!\n" ); cfg_free( cfg ); cmdline_parser_free( &args_info ); -#ifdef _WIN32 - WSACleanup( ); -#endif exit( EXIT_FAILURE ); } } @@ -214,9 +193,6 @@ int main( int argc, char *argv[] ) fprintf( stderr, "FATAL: Unable to create coordinator thread!\n" ); cfg_free( cfg ); cmdline_parser_free( &args_info ); -#ifdef _WIN32 - WSACleanup( ); -#endif exit( EXIT_FAILURE ); } } @@ -240,9 +216,5 @@ int main( int argc, char *argv[] ) cfg_free( cfg ); cmdline_parser_free( &args_info ); -#ifdef _WIN32 - WSACleanup( ); -#endif - exit( EXIT_SUCCESS ); } |