Subject: misc/24847: stdarg.h for vax has an error in one definition of __va_copy()
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <dhgutteridge@hotmail.com>
List: netbsd-bugs
Date: 03/19/2004 04:07:06
>Number:         24847
>Category:       misc
>Synopsis:       stdarg.h for vax has an error in one definition of __va_copy()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 19 04:08:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     David H. Gutteridge
>Release:        N/A
>Organization:
>Environment:
N/A
>Description:
Two of the definitions of __va_copy() in stdarg.h for pdp10 are using the comparison instead of assignment operator.  I've included an incredibly trivial patch below.  (I've submitted this under misc because there wasn't a port-pdp10 selection available.)
>How-To-Repeat:

>Fix:
--- stdarg.h~	Thu Mar 18 22:01:48 2004
+++ stdarg.h	Thu Mar 18 22:48:44 2004
@@ -65,7 +65,7 @@
 
 #define va_end(ap)	
 
-#define __va_copy(dest, src)	((dest) == (src))
+#define __va_copy(dest, src)	((dest) = (src))
 #endif
 #endif /* __GNUC__ */
 
@@ -73,7 +73,7 @@
 #define	va_start(ap, last)	ap = (va_list)&last
 #define	va_arg(ap, type)	(*(type *)((ap) -= (sizeof(type)+3)/4, (ap)))
 #define va_end(ap)
-#define	__va_copy(dest, src)	((dest) == (src))
+#define	__va_copy(dest, src)	((dest) = (src))
 #endif /* __PCC__ */
 
 #if !defined(_ANSI_SOURCE) && \


>Release-Note:
>Audit-Trail:
>Unformatted: