mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
curl: add compatibility for Amiga and GCC 6.5
Changes are mainly reordering and adding of includes required to compile with a more recent version of GCC. Closes #6220
This commit is contained in:
parent
c353207057
commit
0d16a49c16
20
acinclude.m4
20
acinclude.m4
@ -1880,11 +1880,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_WINDOWS_H
|
#ifndef HAVE_WINDOWS_H
|
||||||
#ifdef HAVE_PROTO_BSDSOCKET_H
|
|
||||||
#include <proto/bsdsocket.h>
|
|
||||||
struct Library *SocketBase = NULL;
|
|
||||||
#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_SELECT_H
|
#ifdef HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#elif defined(HAVE_UNISTD_H)
|
#elif defined(HAVE_UNISTD_H)
|
||||||
@ -1893,6 +1888,11 @@ struct Library *SocketBase = NULL;
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_PROTO_BSDSOCKET_H
|
||||||
|
#include <proto/bsdsocket.h>
|
||||||
|
struct Library *SocketBase = NULL;
|
||||||
|
#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
]],[[
|
]],[[
|
||||||
select(0, 0, 0, 0, 0);
|
select(0, 0, 0, 0, 0);
|
||||||
@ -1945,11 +1945,6 @@ struct Library *SocketBase = NULL;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_WINDOWS_H
|
#ifndef HAVE_WINDOWS_H
|
||||||
#ifdef HAVE_PROTO_BSDSOCKET_H
|
|
||||||
#include <proto/bsdsocket.h>
|
|
||||||
struct Library *SocketBase = NULL;
|
|
||||||
#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_SELECT_H
|
#ifdef HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#elif defined(HAVE_UNISTD_H)
|
#elif defined(HAVE_UNISTD_H)
|
||||||
@ -1958,6 +1953,11 @@ struct Library *SocketBase = NULL;
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_PROTO_BSDSOCKET_H
|
||||||
|
#include <proto/bsdsocket.h>
|
||||||
|
struct Library *SocketBase = NULL;
|
||||||
|
#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||||
|
#endif
|
||||||
#define SELECTCALLCONV
|
#define SELECTCALLCONV
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_STRUCT_TIMEVAL
|
#ifndef HAVE_STRUCT_TIMEVAL
|
||||||
|
@ -863,14 +863,14 @@ then
|
|||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
|
||||||
then
|
then
|
||||||
dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
|
dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
|
||||||
AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
|
AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
#include <proto/bsdsocket.h>
|
#include <proto/bsdsocket.h>
|
||||||
struct Library *SocketBase = NULL;
|
struct Library *SocketBase = NULL;
|
||||||
]],[[
|
]],[[
|
||||||
gethostbyname("www.dummysite.com");
|
gethostbyname("www.dummysite.com");
|
||||||
]])
|
]])
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
||||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
|
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
|
||||||
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
|
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
|
||||||
defined(__CYGWIN__) || \
|
defined(__CYGWIN__) || defined(AMIGA) || \
|
||||||
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
|
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -277,10 +277,16 @@
|
|||||||
# include <exec/execbase.h>
|
# include <exec/execbase.h>
|
||||||
# include <proto/exec.h>
|
# include <proto/exec.h>
|
||||||
# include <proto/dos.h>
|
# include <proto/dos.h>
|
||||||
|
# include <unistd.h>
|
||||||
# ifdef HAVE_PROTO_BSDSOCKET_H
|
# ifdef HAVE_PROTO_BSDSOCKET_H
|
||||||
# include <proto/bsdsocket.h> /* ensure bsdsocket.library use */
|
# include <proto/bsdsocket.h> /* ensure bsdsocket.library use */
|
||||||
# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||||
# endif
|
# endif
|
||||||
|
/*
|
||||||
|
* In clib2 arpa/inet.h warns that some prototypes may clash
|
||||||
|
* with bsdsocket.library. This avoids the definition of those.
|
||||||
|
*/
|
||||||
|
# define __NO_NET_API
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "tool_setup.h"
|
#include "tool_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
|
# undef __NO_NET_API /* required for building for AmigaOS */
|
||||||
# include <pwd.h>
|
# include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user