[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 360/411: curl: add compatibility for Amiga and GCC 6.5
From: |
gnunet |
Subject: |
[gnurl] 360/411: curl: add compatibility for Amiga and GCC 6.5 |
Date: |
Wed, 13 Jan 2021 01:22:55 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 0d16a49c16a868524a3e51d390b5ea106ce9b51c
Author: Oliver Urbann <oliver.urbann@tu-dortmund.de>
AuthorDate: Wed Nov 18 19:44:35 2020 +0100
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
---
acinclude.m4 | 20 ++++++++++----------
configure.ac | 6 +++---
include/curl/curl.h | 2 +-
lib/curl_setup.h | 6 ++++++
src/tool_homedir.c | 1 +
5 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 380a8fffc..61ecd4fe1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1880,11 +1880,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
#endif
#endif
#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
#include <sys/select.h>
#elif defined(HAVE_UNISTD_H)
@@ -1893,6 +1888,11 @@ struct Library *SocketBase = NULL;
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#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
]],[[
select(0, 0, 0, 0, 0);
@@ -1945,11 +1945,6 @@ struct Library *SocketBase = NULL;
#endif
#endif
#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
#include <sys/select.h>
#elif defined(HAVE_UNISTD_H)
@@ -1958,6 +1953,11 @@ struct Library *SocketBase = NULL;
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#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
#endif
#ifndef HAVE_STRUCT_TIMEVAL
diff --git a/configure.ac b/configure.ac
index 1075511c9..39bdb5ef1 100755
--- a/configure.ac
+++ b/configure.ac
@@ -863,14 +863,14 @@ then
])
fi
-if test "$HAVE_GETHOSTBYNAME" != "1"
+if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
then
dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
+ #include <proto/bsdsocket.h>
+ struct Library *SocketBase = NULL;
]],[[
gethostbyname("www.dummysite.com");
]])
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 492a71cfe..a73418dce 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -74,7 +74,7 @@
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
- defined(__CYGWIN__) || \
+ defined(__CYGWIN__) || defined(AMIGA) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h>
#endif
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index def1317b2..59fb3fd53 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -277,10 +277,16 @@
# include <exec/execbase.h>
# 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)
# 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
#include <stdio.h>
diff --git a/src/tool_homedir.c b/src/tool_homedir.c
index 25e13101a..632bdcc4f 100644
--- a/src/tool_homedir.c
+++ b/src/tool_homedir.c
@@ -22,6 +22,7 @@
#include "tool_setup.h"
#ifdef HAVE_PWD_H
+# undef __NO_NET_API /* required for building for AmigaOS */
# include <pwd.h>
#endif
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 326/411: ngtcp2: adapt to recent nghttp3 updates, (continued)
- [gnurl] 326/411: ngtcp2: adapt to recent nghttp3 updates, gnunet, 2021/01/12
- [gnurl] 411/411: add lowercase curl, gnunet, 2021/01/12
- [gnurl] 393/411: SECURITY-PROCESS: disclose on hackerone, gnunet, 2021/01/12
- [gnurl] 385/411: openssl: free mem_buf in error path, gnunet, 2021/01/12
- [gnurl] 397/411: ftp: retry getpeername for FTP with TCP_FASTOPEN, gnunet, 2021/01/12
- [gnurl] 406/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 398/411: Revert "multi: implement wait using winsock events", gnunet, 2021/01/12
- [gnurl] 387/411: NEW-PROTOCOL: document what needs to be done to add one, gnunet, 2021/01/12
- [gnurl] 383/411: ntlm: avoid malloc(0) on zero length user and domain, gnunet, 2021/01/12
- [gnurl] 355/411: cmake: use libcurl.rc in all Windows builds, gnunet, 2021/01/12
- [gnurl] 360/411: curl: add compatibility for Amiga and GCC 6.5,
gnunet <=
- [gnurl] 345/411: KNOWN_BUGS: make a new section for cmake topics, gnunet, 2021/01/12
- [gnurl] 274/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 330/411: THANKS-filter: ignore autobuild links, gnunet, 2021/01/12
- [gnurl] 368/411: asyn: use 'struct thread_data *' instead of 'void *', gnunet, 2021/01/12
- [gnurl] 305/411: rtsp: fixed the RTST Session ID mismatch in test 570, gnunet, 2021/01/12
- [gnurl] 371/411: infof/failf calls: fix format specifiers, gnunet, 2021/01/12
- [gnurl] 339/411: curl: only warn not fail, if not finding the home dir, gnunet, 2021/01/12
- [gnurl] 319/411: tool_operate: set HSTS with CURLOPT_HSTS to pass on filename, gnunet, 2021/01/12
- [gnurl] 272/411: alt-svc: enable by default, gnunet, 2021/01/12
- [gnurl] 391/411: docs: fix typos and markup in ETag manpage sections, gnunet, 2021/01/12