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

Wichmann, Mats D mats.d.wichmann at intel.com
Fri Jul 6 05:10:07 PDT 2007


Denis Silakov wrote:
> 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.

so, at least as things stand at the moment, a generic type in
addition to arch-specific types seems "more correct", at least
if that type is used in function prototypes, right?

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




More information about the Lsb-infrastructure mailing list