amissl: allow AmiSSL to be used with AmigaOS 4.x builds
Enable AmiSSL to be used instead of static OpenSSL link libraries. for AmigaOS 4.x, as it already is in the AmigaOS 3.x build. Closes #9269
This commit is contained in:
parent
dc8c859b0c
commit
a041ed8cde
@ -39,7 +39,22 @@
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifdef __AMIGA__
|
||||
#if defined(HAVE_PROTO_BSDSOCKET_H) && !defined(USE_AMISSL)
|
||||
|
||||
#ifdef __amigaos4__
|
||||
|
||||
#ifdef USE_AMISSL
|
||||
int Curl_amiga_select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *errorfds, struct timeval *timeout)
|
||||
{
|
||||
int r = WaitSelect(nfds, readfds, writefds, errorfds, timeout, 0);
|
||||
/* Ensure Ctrl-C signal is actioned */
|
||||
if((r == -1) && (SOCKERRNO == EINTR))
|
||||
raise(SIGINT);
|
||||
return r;
|
||||
}
|
||||
#endif /* USE_AMISSL */
|
||||
|
||||
#elif defined(HAVE_PROTO_BSDSOCKET_H) && !defined(USE_AMISSL)
|
||||
struct Library *SocketBase = NULL;
|
||||
extern int errno, h_errno;
|
||||
|
||||
|
||||
@ -279,9 +279,24 @@
|
||||
# include <proto/exec.h>
|
||||
# include <proto/dos.h>
|
||||
# include <unistd.h>
|
||||
# ifdef HAVE_PROTO_BSDSOCKET_H
|
||||
# include <proto/bsdsocket.h> /* ensure bsdsocket.library use */
|
||||
# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||
# if defined(HAVE_PROTO_BSDSOCKET_H) && \
|
||||
(!defined(__amigaos4__) || defined(USE_AMISSL))
|
||||
/* use bsdsocket.library directly, instead of libc networking functions */
|
||||
# include <proto/bsdsocket.h>
|
||||
# ifdef __amigaos4__
|
||||
int Curl_amiga_select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *errorfds, struct timeval *timeout);
|
||||
# define select(a,b,c,d,e) Curl_amiga_select(a,b,c,d,e)
|
||||
# else
|
||||
# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||
# endif
|
||||
/* must not use libc's fcntl() on bsdsocket.library sockfds! */
|
||||
# undef HAVE_FCNTL
|
||||
# undef HAVE_FCNTL_O_NONBLOCK
|
||||
# else
|
||||
/* use libc networking and hence close() and fnctl() */
|
||||
# undef HAVE_CLOSESOCKET_CAMEL
|
||||
# undef HAVE_IOCTLSOCKET_CAMEL
|
||||
# endif
|
||||
/*
|
||||
* In clib2 arpa/inet.h warns that some prototypes may clash
|
||||
|
||||
Loading…
Reference in New Issue
Block a user