Re: [PATCH v2 1/4] xfsprogs: Prefix LIST_... macros to XFS_LIST_...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> From: "Dave Chinner" <david@xxxxxxxxxxxxx>

> > /usr/include/sys/queue.h:417:9: note: previous definition is here
> > #define LIST_HEAD(name, type)                                           \
> >         ^
> > (and the same for LIST_HEAD_INIT)
> > 
> > sys/queue.h is not linked directly, but from many system libraries.
> > A quick grep on /usr/include/ shows 24 header files including the queue,
> > sys/mount.h one of them. And I didn't found a way how to avoid it.
> 
> Ok, so 4.4BSD introduced these years ago. Now it rings a bell, but I
> can't find the relevant thread I'm thinking of (google has become
> almost useless as a mailing list search engine in recent times).
> 
> I suspect that we are going to need an
> 
> #undef LIST_HEAD
> 
> somewhere in include/libxfs.h, libxfs/libxfs_priv.h and/or
> include/list.h just to ensure we don't use the system definitions
> (with a large comment explaining it).
> 

Great! Putting it in libxfs/list.h seems to be enough. This header should be
included anywhere where our lists are used, so I think there should be no
risk of using the system definition anymore. I'm making an updated patch.

Thanks for pointing on #undef. I'm sure I must have heard of it before, 
but as I never used it... :-)

Cheers,
Jan

-- 
Jan Tulak
jtulak@xxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux