[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-nfs
Subject:    Re: [PATCH 04/11] exportfs: define _GNU_SOURCE for stat64
From:       Jeff Layton <jeff.layton () primarydata ! com>
Date:       2014-07-31 11:34:41
Message-ID: 20140731073441.7e354359 () tlielax ! poochiereds ! net
[Download RAW message or body]

On Thu, 31 Jul 2014 11:30:22 +1000
NeilBrown <neilb@suse.de> wrote:

> On Wed, 30 Jul 2014 13:23:12 +0200 Natanael Copa <natanael.copa@gmail.com>
> wrote:
> 
> > Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
> > ---
> >  utils/exportfs/exportfs.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
> > index bf07555..7ab93d1 100644
> > --- a/utils/exportfs/exportfs.c
> > +++ b/utils/exportfs/exportfs.c
> > @@ -12,6 +12,10 @@
> >  #include <config.h>
> >  #endif
> >  
> > +#ifndef _GNU_SOURCE
> > +#define _GNU_SOURCE
> > +#endif
> > +
> >  #include <sys/types.h>
> >  #include <sys/stat.h>
> >  #include <sys/vfs.h>
> 
> These all look really sensible!
> 
> One small suggestion: it would be really nice to see a comment in the code
> explaining why _GNU_SOURCE is needed.  I suspect such comments get out of
> date quickly, so maybe it wouldn't end up be all that useful.  But having a
> comment is still, in my opinion, more useful than not.
> 
> Thanks,
> NeilBrown
> 

Agreed, they all look pretty sensible. That said, I think the supposed
best way to enable _GNU_SOURCE on autoconf projects is to use
AC_USE_SYSTEM_EXTENSIONS:

    https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Posix-Variants.html

-- 
Jeff Layton <jlayton@primarydata.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic