re PR libgcj/9652 (libjava bootstrap failure on irix6.5.1[78])

2003-02-24  David Billinghurst <David.Billinghurst@riotinto.com>

	Fixes PR libgcj/9652.
	Backport patch from mainline:
	2003-02-12  Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>

	* fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78]
	socklen_t definition.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/sys/socket.h: New file.

From-SVN: r63349
This commit is contained in:
David Billinghurst 2003-02-24 01:41:13 +00:00 committed by David Billinghurst
parent faffb2eb5d
commit 40b1ab9f71
3 changed files with 86 additions and 3 deletions

View File

@ -1,3 +1,14 @@
2003-02-24 David Billinghurst <David.Billinghurst@riotinto.com>
Fixes PR libgcj/9652.
Backport patch from mainline:
2003-02-12 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78]
socklen_t definition.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/sys/socket.h: New file.
2003-02-23 Hans-Peter Nilsson <hp@axis.com>
* regmove.c (optimize_reg_copy_1): Do not replace a hard register

View File

@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
* This file contains 146 fixup descriptions.
* This file contains 147 fixup descriptions.
*
* See README for more information.
*
@ -2541,6 +2541,48 @@ static const char* apzIrix_Limits_ConstPatch[] = {
"extern __const ",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Irix_Socklen_T fix
*/
tSCC zIrix_Socklen_TName[] =
"irix_socklen_t";
/*
* File name selection pattern
*/
tSCC zIrix_Socklen_TList[] =
"|sys/socket.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzIrix_Socklen_TMachs[] = {
"mips-sgi-irix6.5",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zIrix_Socklen_TSelect0[] =
"(#define _SOCKLEN_T\n\
)(typedef u_int32_t socklen_t;)";
#define IRIX_SOCKLEN_T_TEST_CT 1
static tTestDesc aIrix_Socklen_TTests[] = {
{ TT_EGREP, zIrix_Socklen_TSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Irix_Socklen_T
*/
static const char* apzIrix_Socklen_TPatch[] = {
"format",
"%1#if _NO_XOPEN4 && _NO_XOPEN5\n\
typedef int socklen_t;\n\
#else\n\
%2\n\
#endif /* _NO_XOPEN4 && _NO_XOPEN5 */",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Irix_Stdio_Va_List fix
@ -5774,9 +5816,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 158
#define REGEX_COUNT 159
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 146
#define FIX_COUNT 147
/*
* Enumerate the fixes
@ -5844,6 +5886,7 @@ typedef enum {
IP_MISSING_SEMI_FIXIDX,
IRIX_ASM_APOSTROPHE_FIXIDX,
IRIX_LIMITS_CONST_FIXIDX,
IRIX_SOCKLEN_T_FIXIDX,
IRIX_STDIO_VA_LIST_FIXIDX,
ISC_FMOD_FIXIDX,
ISC_OMITS_WITH_STDC_FIXIDX,
@ -6241,6 +6284,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
IRIX_LIMITS_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIrix_Limits_ConstTests, apzIrix_Limits_ConstPatch, 0 },
{ zIrix_Socklen_TName, zIrix_Socklen_TList,
apzIrix_Socklen_TMachs,
IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIrix_Socklen_TTests, apzIrix_Socklen_TPatch, 0 },
{ zIrix_Stdio_Va_ListName, zIrix_Stdio_Va_ListList,
apzIrix_Stdio_Va_ListMachs,
IRIX_STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -1485,6 +1485,30 @@ fix = {
};
/*
* IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t.
* Various socket function prototypes use different types instead,
* depending on the API in use (BSD, XPG4/5), but the socklen_t
* definition doesn't reflect this (SGI Bug Id 864477, fixed in
* IRIX 6.5.19).
*/
fix = {
hackname = irix_socklen_t;
files = sys/socket.h;
select = "(#define _SOCKLEN_T\n)(typedef u_int32_t socklen_t;)";
mach = "mips-sgi-irix6.5";
c_fix = format;
c_fix_arg = "%1"
"#if _NO_XOPEN4 && _NO_XOPEN5\n"
"typedef int socklen_t;\n"
"#else\n"
"%2\n"
"#endif /* _NO_XOPEN4 && _NO_XOPEN5 */";
test_text = "#define _SOCKLEN_T\ntypedef u_int32_t socklen_t;";
};
/*
* 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