Message-ID: <007401c20630$0c097b20$0102a8c0@acceleron> From: "Andrew Cottrell" To: Cc: "Richard Dawe" Subject: GCC 3.1 & CVS LIBC emu387.cc patch (fatal error) Date: Tue, 28 May 2002 19:58:54 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Reply-To: djgpp-workers AT delorie DOT com 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? Andrew --- src\libemu\src\emu387.cc 2002-05-28 19:32:40.000000000 +1000 +++ src\libemu\src\orig\emu387.cc 2002-05-28 19:45:28.000000000 +1000 @@ -1,10 +1,8 @@ -/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include #include #include #include @@ -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