www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/28/07:01:07

Message-ID: <007401c20630$0c097b20$0102a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>
Cc: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Subject: GCC 3.1 & CVS LIBC emu387.cc patch (fatal error)
Date: Tue, 28 May 2002 19:58:54 +1000
MIME-Version: 1.0
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 <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <setjmp.h>
@@ -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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019