[committed] Fix errno definition on HP-UX (put in extern "C")
Steve Ellcey
sje@cup.hp.com
Fri Jun 23 16:55:00 GMT 2006
I have checked in the following HP-UX change to deal with the fact that
errno on HP-UX is declared in two different headers, one inside 'extern
"C"' and one outside. C++ used to not complain about this, but now it
does due to the patch for PR 27227.
This patch puts the /usr/include/errno.h declaration of errno inside an
'extern "C". This header file bug is fixed in HP-UX 11.31 (not yet
released), so I restricted the header file fix to HP-UX 10.* and 11.[12]
versions.
2006-06-23 Steve Ellcey <sje@cup.hp.com>
PR target/28084
* inclhack.def (hpux_extern_errno): New.
* fixincl.x: Regenerate.
Index: inclhack.def
===================================================================
--- inclhack.def (revision 114920)
+++ inclhack.def (working copy)
@@ -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
More information about the Gcc-patches
mailing list