cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: [PATCH] save metadata to extended file attributes

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 8 Nov 2010 01:03:41 +0100

On Monday 08 November 2010 00:57:17 Kamil Dudka wrote:
> On Monday 08 November 2010 00:14:57 Dan Fandrich wrote:
> > On Sun, Nov 07, 2010 at 05:26:31PM +0100, Stefan Tomanek wrote:
> > > For some reason, configure does not enable xattr support here:
> > >
> > > configure:30318: checking if setxattr can be linked
> > > configure:30347: gcc -o conftest -g0 -O2 -Wno-system-headers
> > > conftest.c -lidn -lssh2 -lssl -lcrypto -lldap -lrt -lssl -lcrypto -lz
> > >
> > > >&5 configure:30347: $? = 0
> > >
> > > configure:30349: result: yes
> > > configure:30364: checking if setxattr is prototyped
> > > configure:30381: result: no
> > > configure:30440: checking if setxattr might be used
> > > configure:30455: result: no
> >
> > Here, too. Oddly, the CURL_CHECK_FUNC_SETXATTR autoconf macro doesn't
> > actually attempt to #include <sys/xattr.h>, but for some reason includes
> > sys/uio.h instead; I can't figure out what's supposed to go on in there.
>
> This might fix it:
>
> diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
> index 3673e53..b2c756b 100644
> --- a/m4/curl-functions.m4
> +++ b/m4/curl-functions.m4
> @@ -5913,7 +5913,7 @@ dnl shell variable curl_disallow_setxattr, then
> dnl HAVE_SETXATTR will be defined.
>
> AC_DEFUN([CURL_CHECK_FUNC_SETXATTR], [
> - AC_REQUIRE([CURL_INCLUDES_SYS_UIO])dnl
> + AC_REQUIRE([CURL_INCLUDES_SYS_SETXATTR])dnl

Oops, not that easy. It should have been CURL_INCLUDES_SYS_XATTR. We will
probably also need to write something like this:

AC_DEFUN([CURL_INCLUDES_SYS_UIO], [
curl_includes_sys_uio="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_UIO_H
# include <sys/uio.h>
#endif
/* includes end */"
  AC_CHECK_HEADERS(
    sys/types.h sys/uio.h,
    [], [], [$curl_includes_sys_uio])
])

> #
> tst_links_setxattr="unknown"
> tst_proto_setxattr="unknown"
>
> Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-08