On Sat, Sep 27, 2003 at 03:57:41AM +0800, Nayan  wrote:
> Hi,
> 
> I am trying to run splint on GAIM code on Redhat 8 machine. I get parse error as 
> shown below.
> inet.h is included from file internal.h. I have tried options given in help but they 
> do not solve the probblem.
> Please help!!
> 
> $ ../../../bin/splint +posixlib -posix-lib -I/usr/include/glib-2.0 
> -I/usr/include/gtk-2.0 -I../plugins/ -I/usr/include/pango-1.0/ 
> -I/usr/include/wine/wine  *.c
> Splint 3.1.1 --- 26 Sep 2003
> 
> /usr/include/arpa/inet.h:35:27: Parse Error. (For help on parse errors, see
>                splint -help parseerrors.)
> *** Cannot continue.

I know that error.

The offending line (Linux 2.4.21, Debian) is:
typedef __socklen_t socklen_t;

Splint does not recognize <arpa/inet.h> as a system header, but knows
<netinet/in.h>.

The type __socklen_t is defined in <netinet/in.h>. Splint does not parse
this header and uses its own definitions instead. Therefore the
identifier __socklen_t is not known to splint.

Solution 1: Splint should have an additional library (like posixlib)
that knows the Single Unix Specification (susv3).

Solution 2: Write your own splint-specific header <arpa/inet.h>.

#ifdef S_SPLINT_S
# include "splint-include/arpa/inet.h"
#else
# include <arpa/inet.h>
#endif

==== splint-include/arpa/inet.h ====
typedef /[EMAIL PROTECTED]@*/ socklen_t;

/* ... other definitions ... */
==== EOF ====

Roland
_______________________________________________
splint-discuss mailing list
[EMAIL PROTECTED]
http://www.splint.org/mailman/listinfo/splint-discuss

Reply via email to