Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hppa/include Provide lint wrappers around the va_* ...



details:   https://anonhg.NetBSD.org/src/rev/d5e2517b023b
branches:  trunk
changeset: 573645:d5e2517b023b
user:      jmc <jmc%NetBSD.org@localhost>
date:      Thu Feb 03 23:45:37 2005 +0000

description:
Provide lint wrappers around the va_* defs like other ports do so this can
make it through lint (was dying in libpam)

diffstat:

 sys/arch/hppa/include/stdarg.h |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 970b64e55e33 -r d5e2517b023b sys/arch/hppa/include/stdarg.h
--- a/sys/arch/hppa/include/stdarg.h    Thu Feb 03 23:39:32 2005 +0000
+++ b/sys/arch/hppa/include/stdarg.h    Thu Feb 03 23:45:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdarg.h,v 1.2 2003/08/07 16:27:52 agc Exp $   */
+/*     $NetBSD: stdarg.h,v 1.3 2005/02/03 23:45:37 jmc Exp $   */
 
 /*     $OpenBSD: stdarg.h,v 1.2 1998/11/23 03:28:23 mickey Exp $       */
 
@@ -38,11 +38,19 @@
 
 typedef double *va_list;
 
+#ifdef __lint__
+
+#define va_start(ap, last)      ((ap) = *(va_list *)0)
+#define va_arg(ap, type)        (*(type *)(void *)&(ap))
+#define va_end(ap)
+
+#else
+
 #ifdef __GNUC__
 #define        va_start(ap,lastarg)    ((ap) = (va_list)__builtin_saveregs())
 #else
 #define        va_start(ap,lastarg)    __builtin_va_start(ap, &lastarg)
-#endif
+#endif /* __GNUC__ */
 
 #define va_arg(ap,type)                                                        \
        (sizeof(type) > 8 ?                                             \
@@ -54,4 +62,6 @@
 
 #define        va_end(ap)
 
+#endif /* __lint__ */
+
 #endif /* !_HPPA_STDARG_H */



Home | Main Index | Thread Index | Old Index