re PR target/28084 (/usr/include/errno.h:28: error: previous declaration of 'int errno' with 'C++' linkage)

PR target/28084
	* inclhack.def (hpux_extern_errno): New.
	* fixincl.x: Regenerate.

From-SVN: r114939
This commit is contained in:
Steve Ellcey 2006-06-23 16:21:54 +00:00 committed by Steve Ellcey
parent a441447f7f
commit e10e3ac826
3 changed files with 72 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2006-06-23 Steve Ellcey <sje@cup.hp.com>
PR target/28084
* inclhack.def (hpux_extern_errno): New.
* fixincl.x: Regenerate.
2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
* Makefile.in: Add dvi info html and install-html to .PHONY

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Saturday February 18, 2006 at 07:55:23 AM PST
* It has been AutoGen-ed Thursday June 22, 2006 at 03:07:03 PM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Feb 18 07:55:23 PST 2006
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jun 22 15:07:03 PDT 2006
*
* You must regenerate it. Use the ./genfixes script.
*
@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
* This file contains 195 fixup descriptions.
* This file contains 196 fixup descriptions.
*
* See README for more information.
*
@ -2996,6 +2996,50 @@ static const char* apzHpux_Spu_InfoPatch[] = {
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux_Extern_Errno fix
*/
tSCC zHpux_Extern_ErrnoName[] =
"hpux_extern_errno";
/*
* File name selection pattern
*/
tSCC zHpux_Extern_ErrnoList[] =
"|errno.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzHpux_Extern_ErrnoMachs[] = {
"*-hp-hpux10.*",
"*-hp-hpux11.[0-2]*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux_Extern_ErrnoSelect0[] =
"^[ \t]*extern int errno;$";
#define HPUX_EXTERN_ERRNO_TEST_CT 1
static tTestDesc aHpux_Extern_ErrnoTests[] = {
{ TT_EGREP, zHpux_Extern_ErrnoSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux_Extern_Errno
*/
static const char* apzHpux_Extern_ErrnoPatch[] = {
"format",
"#ifdef __cplusplus\n\
extern \"C\" {\n\
#endif\n\
%0\n\
#ifdef __cplusplus\n\
}\n\
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Huge_Val_Hex fix
@ -7933,9 +7977,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 238
#define REGEX_COUNT 239
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 195
#define FIX_COUNT 196
/*
* Enumerate the fixes
@ -8011,6 +8055,7 @@ typedef enum {
HPUX_LONG_DOUBLE_FIXIDX,
HPUX_SYSTIME_FIXIDX,
HPUX_SPU_INFO_FIXIDX,
HPUX_EXTERN_ERRNO_FIXIDX,
HUGE_VAL_HEX_FIXIDX,
HUGE_VALF_HEX_FIXIDX,
HUGE_VALL_HEX_FIXIDX,
@ -8489,6 +8534,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_SPU_INFO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_Spu_InfoTests, apzHpux_Spu_InfoPatch, 0 },
{ zHpux_Extern_ErrnoName, zHpux_Extern_ErrnoList,
apzHpux_Extern_ErrnoMachs,
HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 },
{ zHuge_Val_HexName, zHuge_Val_HexList,
apzHuge_Val_HexMachs,
HUGE_VAL_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -1716,6 +1716,17 @@ fix = {
test_text = "extern union mpinfou spu_info[];";
};
fix = {
hackname = hpux_extern_errno;
mach = "*-hp-hpux10.*";
mach = "*-hp-hpux11.[0-2]*";
files = errno.h;
select = "^[ \t]*extern int errno;$";
c_fix = format;
c_fix_arg = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n%0\n#ifdef __cplusplus\n}\n#endif";
test_text = " extern int errno;\n";
};
/*
* Fix glibc definition of HUGE_VAL in terms of hex floating point constant