Re: PATCH 2.5.2.9: ext2 unbork fs.h (part 1/7)

Mark Zealey (mark@zealos.org)
Mon, 7 Jan 2002 17:25:28 +0000


On Mon, Jan 07, 2002 at 04:01:33PM +0000, Anton Altaparmakov wrote:

> >> > at this point we have what Linus described:
> >> >
> >> > struct ext2_inode_info {
> >> > ...ext2 stuff...
> >> > struct inode inode;
> >> > };
> >
> >Interesting, it's something I've always wanted to be able to do. But I
> >suppose the compiler requirement is a stupport.
>
> Yes. I wonder if gcc people can be persuaded to backport annonymous
> structures and unions into gcc-2.95...?

You can fake it in a semi-messy way, using a #define, like:

#define STRUCT_INODE \
struct list_head i_hash; \
struct list_head i_list; \
struct list_head i_dentry; \
...

struct inode {
STRUCT_INODE;
};

struct ext2_inode_info {
...ext2 stuff...
STRUCT_INODE;
};

-- 

Mark Zealey mark@zealos.org mark@itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$ !E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---? !R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(www.geekcode.com) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/