[Lsb-infrastructure] should Types have a Generic entry?

Denis Silakov silakov at ispras.ru
Fri Jul 6 00:36:19 PDT 2007


Wichmann, Mats D wrote:
> I'm looking at a case where there are some
> devchk errors reports on "struct statfs".
> It differs from statvfs in that it has a
> Generic entry (size 0) as well as the
> arch-specific entries.  I'm guessing this
> isn't correct, or else the generator script
> in devchk needs to be smarter...
>
>   
Generic records from ArchType are not used by devchk if arch-specific
entries exist (even if there are records not for all 7 architectures),
so the situation you mentioned can't lead to devchk errors.

Generic records are used by header generators - if a generic record
exists, then simple type declaration (without any '#if' directives) will
be printed. As for specification text, type declaration will appear only
in the generic part.

If there are only arch-specific records, then for every architecture its
own declaration (enclosed with the appropriate '#if's) will be
generated, even if there are entries for all supported architectures and
on all architectures declarations are the same. Every arch-specific
document will have this type declaration, but it will not be printed in
the generic specification. It is not good, since, for example, in case
of statfs we have generic interfaces that use this structure.

And in the latter situation, yes, generators could be smarter. But this
is not the case at the moment.

-- 
Regards,
Denis.




More information about the Lsb-infrastructure mailing list