This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/1898: IRIX 5 needs a fixincludes hack


Thanks for the tip, Bruce.  This patch fixes the problem.  Tested on
IRIX 5.2.  Ok for mainline and 3.0 branch?

Index: gcc/ChangeLog
from  Bruce Korb  <bkorb@gnu.org>, Alexandre Oliva  <aoliva@redhat.com>

	* fixinc/inclhack.def (irix_stdio_va_list): New.
	* fixinc/fixincl.x: Rebuilt.

Index: gcc/fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.101.2.3
diff -u -p -r1.101.2.3 inclhack.def
--- gcc/fixinc/inclhack.def 2001/03/08 21:44:03 1.101.2.3
+++ gcc/fixinc/inclhack.def 2001/03/13 20:41:37
@@ -1327,6 +1327,20 @@ fix = {
 
 
 /*
+ *  IRIX 5.x's stdio.h declares some functions that take a va_list as
+ *  taking char *.  However, GCC uses void * for va_list, so 
+ *  calling vfprintf with a va_list fails in C++.  */
+fix = {
+    hackname  = irix_stdio_va_list;
+    files     = stdio.h;
+
+    select = '(printf\(.*), /\* va_list \*/ char \*';
+    c_fix  = format;
+    c_fix_arg = "%1, __gnuc_va_list";
+};
+
+
+/*
  *  Non-traditional "const" declaration in Irix's limits.h.
  */
 fix = {

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]