Bug in Xenix stdarg.h
    Jonathan Bayer 
    jbayer at ispi.UUCP
       
    Tue Oct 10 02:54:32 AEST 1989
    
    
  
Greetings,
This problem is on an SCO Xenix 2.3.2 system running the 2.3 development
system.  While developing a program I had occasion to use <stdarg.h> in
a program.  I kept getting errors, and finally traced them down to
<stdarg.h>.  It turns out that there is an error in the defination:
Original <stdarg.h> :
	#define	va_dcl			int va_alist;
	#define	va_start(list, parmN)	list = (char *) &va_alist
Corrected <stdarg.h> :
	#define	va_start(list, parmN)	list = (char *) &parmN + sizeof(parmN)
According to the ansi defination, va_alist is not there.  It appears
that someone ported the <varargs.h>, and either didn't test it or didn't
understand the defination.
I made these conclusions based on the manual for the Microsoft C 5.1
compiler, which gives a nice description of the differences between
<stdarg.h> and <varargs.h>.
JB
-- 
Jonathan Bayer		Intelligent Software Products, Inc.
(201) 245-5922		500 Oakwood Ave.
jbayer at ispi.COM		Roselle Park, NJ   07204    
    
    
More information about the Comp.unix.xenix
mailing list