[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 104/173: cmake: Support curl --xattr when built wit
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 104/173: cmake: Support curl --xattr when built with cmake |
Date: |
Fri, 24 Feb 2017 14:02:06 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit 1c877a0712b7851c7f286007193668058ed2e987
Author: Sean Burford <address@hidden>
AuthorDate: Tue Jul 19 10:27:20 2016 +1000
cmake: Support curl --xattr when built with cmake
- Test for and set HAVE_FSETXATTR when support for extended file
attributes is present.
Closes https://github.com/curl/curl/pull/1176
---
CMake/CurlTests.c | 16 ++++++++++++++++
CMakeLists.txt | 8 ++++++++
lib/curl_config.h.cmake | 9 +++++++++
3 files changed, 33 insertions(+)
diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c
index ceff39151..bc36c8ef7 100644
--- a/CMake/CurlTests.c
+++ b/CMake/CurlTests.c
@@ -533,3 +533,19 @@ main () {
return 0;
}
#endif
+#ifdef HAVE_FSETXATTR_6
+#include <sys/xattr.h> /* header from libc, not from libattr */
+int
+main() {
+ fsetxattr(0, 0, 0, 0, 0, 0);
+ return 0;
+}
+#endif
+#ifdef HAVE_FSETXATTR_5
+#include <sys/xattr.h> /* header from libc, not from libattr */
+int
+main() {
+ fsetxattr(0, 0, 0, 0, 0);
+ return 0;
+}
+#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14ecceba8..17606bf65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -611,6 +611,7 @@ check_include_file_concat("sys/types.h"
HAVE_SYS_TYPES_H)
check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
+check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H)
check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
@@ -822,6 +823,13 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}"
HAVE_SETSOCKOPT)
# symbol exists in win32, but function does not.
check_function_exists(inet_pton HAVE_INET_PTON)
+check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR)
+if(HAVE_FSETXATTR)
+ foreach(CURL_TEST HAVE_FSETXATTR_5 HAVE_FSETXATTR_6)
+ curl_internal_test_run(${CURL_TEST})
+ endforeach(CURL_TEST)
+endif(HAVE_FSETXATTR)
+
# sigaction and sigsetjmp are special. Use special mechanism for
# detecting those, but only if previous attempt failed.
if(HAVE_SIGNAL_H)
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index 33c15cb6f..49c1b8a2d 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -518,6 +518,15 @@
/* Define to 1 if you have the send function. */
#cmakedefine HAVE_SEND 1
+/* Define to 1 if you have the 'fsetxattr' function. */
+#cmakedefine HAVE_FSETXATTR 1
+
+/* fsetxattr() takes 5 args */
+#cmakedefine HAVE_FSETXATTR_5 1
+
+/* fsetxattr() takes 6 args */
+#cmakedefine HAVE_FSETXATTR_6 1
+
/* Define to 1 if you have the <setjmp.h> header file. */
#cmakedefine HAVE_SETJMP_H 1
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 81/173: KNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted, (continued)
- [GNUnet-SVN] [gnurl] 81/173: KNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 85/173: vtls: fix PolarSSL non-blocking handling, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 80/173: *.rc: escape non-ASCII/non-UTF-8 character for clarity, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 64/173: addrinfo: fix compiler warning on offsetof() use, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 51/173: url: Refactor detect_proxy(), gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 50/173: url: Fix NO_PROXY env var to work properly with --proxy option., gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 68/173: TODO: send only part of --data, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 61/173: unix_socket: add support for abstract unix domain socket, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 92/173: telnet: fix windows compiler warnings, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 84/173: vtls: fix mbedtls multi non blocking handshake., gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 104/173: cmake: Support curl --xattr when built with cmake,
gnunet <=
- [GNUnet-SVN] [gnurl] 76/173: parseurl: move back buffer to function scope, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 77/173: usercertinmem.c: improve the short description, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 101/173: docs: we no longer ship HTML versions of man pages, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 96/173: polarssl: fix hangs, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 112/173: darwinssl: Avoid parsing certificates when not in verbose mode, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 95/173: cookies: do not assume a valid domain has a dot, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 66/173: TODO: Chunked transfer multipart formpost, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 137/173: TODO: consider file name from the redirected URL with -O ?, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 107/173: use *.sourceforge.io and misc URL updates, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 70/173: docs: improved language in README.md HISTORY.md CONTRIBUTE.md, gnunet, 2017/02/24