xfs
[Top] [All Lists]

Re: [PATCH v3 08/11] xfsprogs: Add fls check into autoconf

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v3 08/11] xfsprogs: Add fls check into autoconf
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Fri, 14 Aug 2015 14:59:22 +0200
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <117593154.2602203.1438690346097.JavaMail.zimbra@xxxxxxxxxx>
References: <1438612789-17486-1-git-send-email-jtulak@xxxxxxxxxx> <1438612789-17486-9-git-send-email-jtulak@xxxxxxxxxx> <20150804112103.GF18906@xxxxxxxxxxxxx> <117593154.2602203.1438690346097.JavaMail.zimbra@xxxxxxxxxx>
On Tue, Aug 4, 2015 at 2:12 PM, Jan Tulak <jtulak@xxxxxxxxxx> wrote:


----- Original Message -----
> From: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
> To: "Jan Tulak" <jtulak@xxxxxxxxxx>
> Cc: hch@xxxxxxxxxxxxx, xfs@xxxxxxxxxxx
> Sent: Tuesday, August 4, 2015 1:21:03 PM
> Subject: Re: [PATCH v3 08/11] xfsprogs: Add fls check into autoconf
>
> Can't you just use something like:
>
> AC_CHECK_DECL([fls],
>Â Â Â Â Â[AC_DEFINE([HAVE_FLS_PROTOTYPE], [1],
>Â Â Â Â [Define to 1 if have fls prototype])],
>Â Â Â Â [],
>Â Â Â Â [#include <string.h>])
>

You mean to replace the entire autoconf part of the patch with this?
I will try it. Autoconf is still a bit of a black magic for me, so I
used the already existing checks. :-)

Hi Chris,
did you want the result to be this? (I didn't get any clarification of what you mean, so I'm asking again. :-) )

#
# Check if we have a flc call (Mac OS X)
#
AC_DEFUN([AC_HAVE_FLS],
 [ AC_CHECK_DECL([fls],
   Âhave_fls=yes,
   Â[],
   Â[#include <string.h>]
   Â)
  AC_SUBST(have_fls)
 ])Â

Cheers,
Jan

--
<Prev in Thread] Current Thread [Next in Thread>