Mail Archives: djgpp-workers/2002/05/28/08:31:13
On 28 May 2002 at 19:58, Andrew Cottrell wrote:
> All,
>
> Below is a patch that I've used in order to build DJGPP CVS LIBEMU.A with
> gcc 3.1. Any problems with this?
>
> @@ -143,12 +141,9 @@ static inline int is_zero(reg a)
> #ifndef eprintf
> static void eprintf(const char *f, ...)
> {
> - va_list args;
> char buf[1000];
> - va_start(args, f);
> - vsprintf(buf, f, args);
> + vsprintf(buf, f, (char *)(&f)+1);
> _write(1, buf, strlen(buf));
> - va_end(args);
> }
> #endif
>
2 small comments:
Perhaps it's better to use vsnprintf instead of vsprintf in this case
(perhaps the same about debugger related files: perhaps we also should use
vsnprintf where possible)
Also patch seems to be reversed (for emu386.cc only)
Andris
- Raw text -