Subject: splint- fails on sys/cdefs.h
To: None <>
From: Florent Parent <>
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 --- 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)
#ifdef __lint__
#define	__RENAME(x)	__symbolrename(x)
 #error "No function renaming possible"
#endif /* __lint__ */
#endif /* __GNUC__ */
#else /* _STANDALONE || _KERNEL */
#define	__RENAME(x)	no renaming in kernel or standalone environment

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

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

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

any help appreciated.