This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/28084] [4.2 Regression] /usr/include/errno.h:28: error: previous declaration of 'int errno' with 'C++' linkage



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]