Subject: splint-3.0.1.6 fails on sys/cdefs.h
To: None <netbsd-users@netbsd.org>
From: Florent Parent <Florent.Parent@hexago.com>
List: netbsd-users
Date: 04/24/2003 11:16:38
Anyone successfully used splint (/usr/pkgsrc/devel/splint) on NetBSD? I get 
errors on sys/cdefs.h with just about any source code:

$ splint /usr/src/bin/pwd/pwd.c
Splint 3.0.1.6 --- 20 Apr 2003

   In file included from pwd.c:36
include/sys/cdefs.h:232:40: #error "No function renaming possible"
Preprocessing error for file: /usr/src/bin/pwd/pwd.c
*** Cannot continue.

Offending code in cdefs.h is
#if !defined(_STANDALONE) && !defined(_KERNEL)
#ifdef __GNUC__
#define	__RENAME(x)	___RENAME(x)
#else
#ifdef __lint__
#define	__RENAME(x)	__symbolrename(x)
#else
 #error "No function renaming possible"
#endif /* __lint__ */
#endif /* __GNUC__ */
#else /* _STANDALONE || _KERNEL */
#define	__RENAME(x)	no renaming in kernel or standalone environment
#endif

I've tried -D__lint__ (like lint(1) does) but that simply fails elsewhere:

$ splint -D__lint__ /usr/src/bin/pwd/pwd.c
Splint 3.0.1.6 --- 20 Apr 2003

include/sys/bswap.h:21:42: Parse Error:
               New function scope inside function. (For help on parse 
errors,
               see splint -help parseerrors.)
*** Cannot continue.

any help appreciated.

Florent