This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28084] [4.2 Regression] /usr/include/errno.h:28: error: previous declaration of 'int errno' with 'C++' linkage
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2006 23:48:55 -0000
- Subject: [Bug target/28084] [4.2 Regression] /usr/include/errno.h:28: error: previous declaration of 'int errno' with 'C++' linkage
- References: <bug-28084-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from sje at cup dot hp dot com 2006-06-19 23:48 -------
There was nothing intentional about the different linkages, in unreleased HP-UX
sources, they fixed it to be in 'extern "C"' in both places. Here is a patch
to inclhack.def that I have tested. I haven't submitted it because I was
waiting for the MAINTAINERS change to happen.
fix = {
hackname = hpux11_extern_errno;
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";
};
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28084