From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12194 invoked by alias); 19 Jun 2006 23:49:01 -0000 Received: (qmail 12161 invoked by uid 48); 19 Jun 2006 23:48:55 -0000 Date: Mon, 19 Jun 2006 23:50:00 -0000 Message-ID: <20060619234855.12160.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/28084] [4.2 Regression] /usr/include/errno.h:28: error: previous declaration of 'int errno' with 'C++' linkage In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sje at cup dot hp dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg01795.txt.bz2 List-Id: ------- 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