/* This file is part of Lcrzo.
*/

#if defined LCRZODEF_SYSTEM_Unix
  /* this function is not needed */
#elif defined LCRZODEF_SYSTEM_Windows

/*-------------------------------------------------------------*/
int lcrzo_priv_winsock_init(void)
{ WSADATA wsaData;
  int major;
  int minor;
  int ret; 
 
  major=1; minor=1;
  ret = WSAStartup(MAKEWORD(major, minor), &wsaData); 
  if (ret != 0)
  { return(LCRZO_ERR_FUWSASTARTUP);
  }
 
  if ( HIBYTE( wsaData.wVersion ) != major || 
       LOBYTE( wsaData.wVersion ) != minor ) 
  { WSACleanup();
    return(LCRZO_ERR_FUWSASTARTUPVER);
  }

  return(LCRZO_ERR_OK);
} 

/*-------------------------------------------------------------*/
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif


