16 #include "../../stdafx.h" 
   17 #include "../../debug.h" 
   21 #include "../../safeguards.h" 
   26 struct Library *SocketBase = NULL;
 
   35 #if defined(__MORPHOS__) || defined(__AMIGA__) 
   40   DEBUG(net, 3, 
"[core] loading bsd socket library");
 
   41   SocketBase = OpenLibrary(
"bsdsocket.library", 4);
 
   42   if (SocketBase == NULL) {
 
   43     DEBUG(net, 0, 
"[core] can't open bsdsocket.library version 4, network unavailable");
 
   47 #if defined(__AMIGA__) 
   49   TimerPort = CreateMsgPort();
 
   50   if (TimerPort != NULL) {
 
   51     TimerRequest = (
struct timerequest*)CreateIORequest(TimerPort, 
sizeof(
struct timerequest);
 
   52     if (TimerRequest != NULL) {
 
   53       if (OpenDevice(
"timer.device", UNIT_MICROHZ, (
struct IORequest*)TimerRequest, 0) == 0) {
 
   54         TimerBase = TimerRequest->tr_node.io_Device;
 
   55         if (TimerBase == NULL) {
 
   57           DEBUG(net, 0, 
"[core] can't initialize timer, network unavailable");
 
   70     DEBUG(net, 3, 
"[core] loading windows socket library");
 
   71     if (WSAStartup(MAKEWORD(2, 0), &wsa) != 0) {
 
   72       DEBUG(net, 0, 
"[core] WSAStartup failed, network unavailable");
 
   86 #if defined(__MORPHOS__) || defined(__AMIGA__) 
   88 #if defined(__AMIGA__) 
   89   if (TimerBase    != NULL) CloseDevice((
struct IORequest*)TimerRequest); 
 
   90   if (TimerRequest != NULL) DeleteIORequest(TimerRequest);
 
   91   if (TimerPort    != NULL) DeleteMsgPort(TimerPort);
 
   94   if (SocketBase != NULL) CloseLibrary(SocketBase);
 
  112   for (j = 0; j < 
sizeof(grf->
md5sum); j++) {
 
  126   for (j = 0; j < 
sizeof(grf->
md5sum); j++) {