diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/amigaos.h | 15 | ||||
-rw-r--r-- | lib/config-amigaos.h | 5 | ||||
-rw-r--r-- | lib/easy.c | 9 | ||||
-rw-r--r-- | lib/setup.h | 9 | ||||
-rw-r--r-- | lib/timeval.h | 2 |
5 files changed, 35 insertions, 5 deletions
diff --git a/lib/amigaos.h b/lib/amigaos.h index c2923bdaf..f8529c46e 100644 --- a/lib/amigaos.h +++ b/lib/amigaos.h @@ -21,8 +21,8 @@ * $Id$ ***************************************************************************/ -#ifndef CURL_AMIGAOS_H -#define CURL_AMIGAOS_H +#ifndef LIBCURL_AMIGAOS_H +#define LIBCURL_AMIGAOS_H #ifndef __ixemul__ @@ -34,12 +34,19 @@ #include <bsdsocket.h> -#define select(args...) WaitSelect( args, NULL) +#include "config-amigaos.h" + +#define select(args...) WaitSelect( args, NULL) #define inet_ntoa(x) Inet_NtoA( x ## .s_addr) +#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c) +#define _AMIGASF 1 + +extern void amiga_cleanup(); +extern BOOL amiga_init(); #else /* __ixemul__ */ #warning compiling with ixemul... #endif /* __ixemul__ */ -#endif /* CURL_AMIGAOS_H */ +#endif /* LIBCURL_AMIGAOS_H */ diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h index c4d3950d8..f0fa83e2f 100644 --- a/lib/config-amigaos.h +++ b/lib/config-amigaos.h @@ -1,4 +1,7 @@ +#ifndef LIBCURL_CONFIG_AMIGAOS_H +#define LIBCURL_CONFIG_AMIGAOS_H + #define HAVE_ARPA_INET_H 1 #define HAVE_GETHOSTBYADDR 1 #define HAVE_INET_ADDR 1 @@ -60,6 +63,7 @@ #define PACKAGE_STRING "curl -" #define PACKAGE_TARNAME "curl" #define PACKAGE_VERSION "-" +#define CURL_CA_BUNDLE "s:curl-ca-bundle.crt" #define RETSIGTYPE void #define SELECT_TYPE_ARG1 int @@ -77,3 +81,4 @@ # define O_RDONLY 0x0000 #endif +#endif /* LIBCURL_CONFIG_AMIGAOS_H */ diff --git a/lib/easy.c b/lib/easy.c index f106f1eb1..ce83238d6 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -151,6 +151,11 @@ CURLcode curl_global_init(long flags) if (win32_init() != CURLE_OK) return CURLE_FAILED_INIT; +#ifdef _AMIGASF + if(!amiga_init()) + return CURLE_FAILED_INIT; +#endif + initialized = 1; init_flags = flags; @@ -174,6 +179,10 @@ void curl_global_cleanup(void) if (init_flags & CURL_GLOBAL_WIN32) win32_cleanup(); +#ifdef _AMIGASF + amiga_cleanup(); +#endif + initialized = 0; init_flags = 0; } diff --git a/lib/setup.h b/lib/setup.h index a258c1c6f..e4dac8b98 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -54,6 +54,9 @@ /* hand-modified MacOS config.h! */ #include "config-mac.h" #endif +#ifdef AMIGA +#include "amigaos.h" +#endif #endif @@ -204,6 +207,12 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO) #endif +#ifdef _AMIGASF +#undef HAVE_ALARM +#undef sclose +#define sclose(x) CloseSocket(x) +#endif + #define DIR_CHAR "/" #define DOT_CHAR "." diff --git a/lib/timeval.h b/lib/timeval.h index 3664ba652..cb984c8a6 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -32,7 +32,7 @@ #endif #ifndef HAVE_GETTIMEOFDAY -#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) +#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) && !defined(_AMIGASF) struct timeval { long tv_sec; long tv_usec; |