[splint-discuss] Parse Error on siginfo_t

Ludolf Holzheid lholzheid at bihl-wiedemann.de
Mon Jan 29 14:31:34 PST 2007


On Mon, 2007-01-29 15:02:28 +0900, Yoshioka Tsuneo wrote:
> [..]
> Well, I just tried to use splint.
> But, I got Parse Error on siginfo_t. I just tried to add "+posixlib" or
> "posixstrictlib", but this does not solve the issue.
> Can I get any information to avoid this error ?

Hello Tsuneo,

your problem is, the sources you are trying to process with splint use
features introduced by IEEE Std 1003.1b-1993, whereas split knows
about the POSIX specification IEEE 1003.1-1990 only.

The clean solution would be to update posix.h and re-generate
posix(strict).lcd.

As a quick-and-dirty solution, you could provide a dummy definition
for siginfo_t and hide it from the compiler by enclosing it in
preprocessor directives:

#if defined (S_SPLINT_S)
  typedef struct
  {
    int      si_signo;
    int      si_code;
    pid_t    si_pid;
  }
  siginfo_t;
#endif

Note, splint will still complain about the sa_sigaction member of
struct sigaction, as this seems to be new in IEEE Std 1003.1b-1993.

HTH,

Ludolf

-- 

---------------------------------------------------------------
Ludolf Holzheid             Tel:    +49 621 339960
Bihl+Wiedemann GmbH         Fax:    +49 621 3392239
Floßwörthstraße 41          e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------



More information about the splint-discuss mailing list