[Lsb-infrastructure] changes in devchk

Denis Silakov silakov at ispras.ru
Fri Apr 18 03:35:53 PDT 2008


Wichmann, Mats D wrote:
> Still catching up with old stuff here....
> even though we will perhaps change them to eliminte
> the pre-3.0 or pre-2.0 stuff, I'm adding the headers
> and devchk is being rebuilt to match.  I'm expecting
> the hardcoded #define of __LSB_VERSION__ will
> cause trouble in lsbcc mode, but we'll see.
>
> anyway, some unusual, although cosmetic, changes
> have snuck through in the names of parameters in
> the dummy function prototypes (foo_db):
>
> Example:
>
> - extern in glob_db(const char *, int, int(*__errfunc)(const char *,
> int)
> + extern in glob_db(const char *, int, int(*__fptr3)(const char *, int)
>   

This is intentional. The thing is that previously devchk expected function
pointers to have names like 'fpt-<some_name>'.  <some_name> was used as
parameter name. However, only a few of function pointers have sensible
names;
most of them simply contain header name concatenated with some unique index.
Such names also look rather unclear in Navigator. Thus we've decided to name
function pointers according to the real synopsis of functions they point to.
For example, for ALSA you can see something like the following:

fptr-32746 int (*)(snd_output_t *, const char *, __va_list_tag *) > *

(I'd actually like to get rid of extra 'fptr' and '> *' at the end, but this
is the result of some features in tools that uploaded libasound.)

Surely, in this case we can't use Tname with 'fptr-' dropped as a parameter
name - such 'name' can contain spaces, brackets, asterisks and other symbols
not expected by parser. Thus, mktests was modified to simply name parameters
as 'fptr-<unique_index>'.

I don't think that parameter names in devchk mean a lot; and on the
contrary,
new scheme of FuncPtr naming helps to avoid situations when we have several
records in the Type table which actually designate the same function
pointer.

-- 
Regards,
Denis.



More information about the lsb-infrastructure mailing list