This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c++/1898: IRIX 5 needs a fixincludes hack
- To: Bruce Korb <bkorb at allegronetworks dot com>
- Subject: Re: c++/1898: IRIX 5 needs a fixincludes hack
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 13 Mar 2001 17:44:59 -0300
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Cc: werner dot mausshardt at bruker dot de, gcc-gnats at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <m14afqG-00kQ3tC@nike.software.bruker.de> <B4DFCB7CDE2DD4118F690008C78694167B36ED@tahoe.allegronetworks.com>
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