From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7616 invoked by alias); 28 Feb 2012 16:14:13 -0000 Received: (qmail 7603 invoked by uid 22791); 28 Feb 2012 16:14:11 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_QE X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Feb 2012 16:13:53 +0000 From: "ramana at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/51785] gets not anymore declared Date: Tue, 28 Feb 2012 16:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ramana at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg02721.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51785 --- Comment #14 from Ramana Radhakrishnan 2012-02-28 16:09:52 UTC --- I can confirm that a build for arm-linux-gnueabi completes and do some cross-testing on qemu if that's deemed to be enough. Any other ideas for testing. Ramana Here's a suggestion for the comments in this patch. diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index 049704d..76755ac 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -89,6 +89,17 @@ #undef vprintf #undef vsprintf +/* glibc 2.15 and later do not declare gets anymore for + ISO C11 mode and if __GNU_SOURCE is defined. See + http://gcc.gnu.org/PR51785 for more on this topic. If + this is being changed an equivalent change has to be made + in include/c_std/c_stdio. */ +#if __GLIBC_PREREQ (2,15) +extern "C" { + extern char *gets (char *__s) __attribute__((deprecated)); +} +#endif + namespace std { using ::FILE; diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 510f599..29142bb 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -88,6 +88,17 @@ #undef vprintf #undef vsprintf +/* glibc 2.15 and later do not declare gets anymore for + ISO C11 mode and if __GNU_SOURCE is defined. See + http://gcc.gnu.org/PR51785 for more on this topic. If + this hunk below is being changed please also investigate + the change for include/c_global/cstdio. */ +#if __GLIBC_PREREQ (2,15) +extern "C" { + extern char *gets (char *__s) __attribute__((deprecated)); +} +#endif + namespace std { using ::FILE;