@@ -53,14 +53,14 @@ # define interface struct # include # undef interface #endif -#ifdef OF_AMIGAOS4 -# define __USE_INLINE__ -# define __NOLIBBASE__ -# define __NOGLOBALIFACE__ +#ifdef OF_AMIGAOS +# ifdef OF_AMIGAOS4 +# define __USE_INLINE__ +# endif # include # include #endif #ifdef OF_NINTENDO_3DS @@ -95,25 +95,10 @@ # define HOSTS_PATH @"AmiTCP:db/hosts" # define RESOLV_CONF_PATH @"AmiTCP:db/resolv.conf" #else # define HOSTS_PATH @"/etc/hosts" # define RESOLV_CONF_PATH @"/etc/resolv.conf" -#endif - -#ifdef OF_AMIGAOS4 -extern struct ExecIFace *IExec; -static struct Library *SocketBase = NULL; -static struct SocketIFace *ISocket = NULL; - -OF_DESTRUCTOR() -{ - if (ISocket != NULL) - DropInterface((struct Interface *)ISocket); - - if (SocketBase != NULL) - CloseLibrary(SocketBase); -} #endif /* * TODO: * @@ -1138,22 +1123,17 @@ @synthesize localDomain = _localDomain, searchDomains = _searchDomains; @synthesize timeout = _timeout, maxAttempts = _maxAttempts; @synthesize minNumberOfDotsInAbsoluteName = _minNumberOfDotsInAbsoluteName; @synthesize usesTCP = _usesTCP, configReloadInterval = _configReloadInterval; -#ifdef OF_AMIGAOS4 +#ifdef OF_AMIGAOS + (void)initialize { if (self != [OFDNSResolver class]) return; - if ((SocketBase = OpenLibrary("bsdsocket.library", 4)) == NULL) - @throw [OFInitializationFailedException - exceptionWithClass: self]; - - if ((ISocket = (struct SocketIFace *) - GetInterface(SocketBase, "main", 1, NULL)) == NULL) + if (!of_socket_init()) @throw [OFInitializationFailedException exceptionWithClass: self]; } #endif