From 857f8fc67322ccf7863aa08be4a1fcbbd1fc7945 Mon Sep 17 00:00:00 2001 From: ro Date: Wed, 2 Jul 2003 01:30:10 +0000 Subject: * fixinc/inclhack.def (irix_stdio_va_list): Apply to IRIX 6.5 too. (stdio_va_list): Apply to IRIX 6.5 and too. Substitute va_list uses in inline definition. * fixinc/fixincl.x: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68811 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/fixinc/fixincl.x | 10 ++++++---- gcc/fixinc/inclhack.def | 11 ++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e02edc63ac..537735db545 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-07-02 Rainer Orth + + * fixinc/inclhack.def (irix_stdio_va_list): Apply to IRIX 6.5 + too. + (stdio_va_list): Apply to IRIX 6.5 and + too. + Substitute va_list uses in inline definition. + * fixinc/fixincl.x: Regenerate. + 2003-07-02 Rainer Orth * config/mips/iris5.h (SET_FILE_NUMBER): Moved here from iris3.h. diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 20f13c85b93..1aa7c55ee65 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Wednesday May 28, 2003 at 12:55:57 AM CDT + * It has been AutoGen-ed Wednesday July 2, 2003 at 03:26:19 AM MEST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Wed May 28 00:55:57 CDT 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jul 2 03:26:20 MEST 2003 * * You must regenerate it. Use the ./genfixes script. * @@ -2559,7 +2559,7 @@ tSCC zIrix_Stdio_Va_ListName[] = * File name selection pattern */ tSCC zIrix_Stdio_Va_ListList[] = - "|stdio.h|"; + "|stdio.h|internal/stdio_core.h|"; /* * Machine/OS name selection pattern */ @@ -4206,7 +4206,7 @@ tSCC zStdio_Va_ListName[] = * File name selection pattern */ tSCC zStdio_Va_ListList[] = - "|stdio.h|"; + "|stdio.h|internal/stdio_core.h|internal/wchar_core.h|"; /* * Machine/OS name selection pattern */ @@ -4228,6 +4228,8 @@ static tTestDesc aStdio_Va_ListTests[] = { static const char* apzStdio_Va_ListPatch[] = { "sed", "-e", "s@ va_list @ __gnuc_va_list @\n\ s@ va_list)@ __gnuc_va_list)@\n\ +s@va_list _ap;@__gnuc_va_list _ap;@\n\ +s@(va_list)&@(__gnuc_va_list)\\&@\n\ s@ _VA_LIST_));@ __gnuc_va_list));@\n\ s@ __VA_LIST__));@ __gnuc_va_list));@\n\ s@ va_list@ __not_va_list__@\n\ diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index b43b215aa79..5a513d3edaf 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1440,12 +1440,14 @@ fix = { }; /* - * IRIX 5.x's stdio.h declares some functions that take a va_list as + * IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare + * 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; + files = internal/stdio_core.h; select = '(printf\(.*), /\* va_list \*/ char \*'; c_fix = format; @@ -2328,10 +2330,15 @@ fix = { * presence of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken * to indicate that the header knows what it's doing -- under SUSv2, * stdio.h is required to define va_list, and we shouldn't break that. + * On IRIX 6.5, internal/wchar_core.h used to get its definition of + * va_list from stdio.h. Since this doesn't happen any longer, use + * __gnuc_va_list there, too. */ fix = { hackname = stdio_va_list; files = stdio.h; + files = internal/stdio_core.h; + files = internal/wchar_core.h; bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; /* @@ -2345,6 +2352,8 @@ fix = { */ sed = "s@ va_list @ __gnuc_va_list @\n" "s@ va_list)@ __gnuc_va_list)@\n" + "s@va_list _ap;@__gnuc_va_list _ap;@\n" + "s@(va_list)&@(__gnuc_va_list)\\&@\n" "s@ _VA_LIST_));@ __gnuc_va_list));@\n" "s@ __VA_LIST__));@ __gnuc_va_list));@\n" "s@ va_list@ __not_va_list__@\n" -- cgit v1.2.1