cmake: sync AIX _ALL_SOURCE trick with autotools#14461
Closed
vszakats wants to merge 1 commit intocurl:masterfrom
Closed
cmake: sync AIX _ALL_SOURCE trick with autotools#14461vszakats wants to merge 1 commit intocurl:masterfrom
_ALL_SOURCE trick with autotools#14461vszakats wants to merge 1 commit intocurl:masterfrom
Conversation
Follow-up to 919394e curl#14450 Closes #xxxxx
Member
Author
|
Ref: #14450 (comment) The actual value of |
Contributor
|
FWIW, AIX seems to have trouble compiling out of the box already. I've just sent an AIX build log from yesterday's daily snapshot to https://curl.se/dev/builds.html |
Member
Author
|
Ah, there are issues.
diff --git a/lib/memdebug.h b/lib/memdebug.h
index fd5cc2c94d..2f7baffafe 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -33,7 +33,7 @@
#include <curl/curl.h>
#include "functypes.h"
-#if defined(__GNUC__) && __GNUC__ >= 3
+#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(_AIX)
# define ALLOC_FUNC __attribute__((malloc))
# define ALLOC_SIZE(s) __attribute__((alloc_size(s)))
# define ALLOC_SIZE2(n, s) __attribute__((alloc_size(n, s)))
@@ -114,11 +114,17 @@ CURL_EXTERN int curl_dbg_fclose(FILE *file, int line, const char *source);
/* Set this symbol on the command-line, recompile all lib-sources */
#undef strdup
#define strdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__)
+#undef malloc
#define malloc(size) curl_dbg_malloc(size, __LINE__, __FILE__)
+#undef calloc
#define calloc(nbelem,size) curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
+#undef realloc
#define realloc(ptr,size) curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
+#undef free
#define free(ptr) curl_dbg_free(ptr, __LINE__, __FILE__)
+#undef send
#define send(a,b,c,d) curl_dbg_send(a,b,c,d, __LINE__, __FILE__)
+#undef recv
#define recv(a,b,c,d) curl_dbg_recv(a,b,c,d, __LINE__, __FILE__)
#ifdef _WIN32 |
Contributor
|
That patch gets it successfully through the main compile with only the warnings at easy.c:608 and if2ip.c:219 left. |
Member
Author
|
Member
Author
|
Opened #14464. |
Member
Author
|
Maybe this for the diff --git a/lib/easy.c b/lib/easy.c
index a0704b0ed3..ab34e1499c 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -605,7 +605,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
int act = poll2cselect(fds[i].revents); /* convert */
infof(multi->easyp,
"call curl_multi_socket_action(socket "
- "%" CURL_FORMAT_SOCKET_T ")", fds[i].fd);
+ "%" CURL_FORMAT_SOCKET_T ")", (curl_socket_t)fds[i].fd);
mcode = curl_multi_socket_action(multi, fds[i].fd, act,
&ev->running_handles);
}
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 42e14500bc..55afd553d6 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -216,7 +216,15 @@ if2ip_result_t Curl_if2ip(int af,
memcpy(req.ifr_name, interf, len + 1);
req.ifr_addr.sa_family = AF_INET;
+#if defined(__GNUC__) && defined(_AIX)
+/* Suppress warning inside system headers */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshift-sign-overflow"
+#endif
if(ioctl(dummy, SIOCGIFADDR, &req) < 0) {
+#if defined(__GNUC__) && defined(_AIX)
+#pragma GCC diagnostic pop
+#endif
sclose(dummy);
/* With SIOCGIFADDR, we cannot tell the difference between an interface
that does not exist and an interface that has no address of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to 919394e #14450
Closes #14461