From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15511 invoked by alias); 2 Nov 2010 13:20:58 -0000 Received: (qmail 15499 invoked by uid 22791); 2 Nov 2010 13:20:58 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID 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, 02 Nov 2010 13:20:54 +0000 From: "jb at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/46267] strerror() is not necessarily thread-safe X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jb at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 Date: Tue, 02 Nov 2010 13:20:00 -0000 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: 2010-11/txt/msg00112.txt.bz2 Message-ID: <20101102132000.QCrZ8EvO_yjT8InVtXsv9QrzrWAejs47U0JMaNRxq7I@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46267 --- Comment #3 from Janne Blomqvist 2010-11-02 13:20:48 UTC --- Well, if we want to use strerror_r() we'd have to either first undef _GNU_SOURCE before we include string.h so that we get the POSIX version (but, might this cause some other weird breakage?) or then we need to have versions both for glibc and others. E.g. #ifdef HAVE_STRERROR_R #ifdef _GNU_SOURCE // Use glibc strerror_r() #else // Use POSIX strerror_r() #else // Use strerror() #endif