From patchwork Thu Jan 27 16:58:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Blomqvist X-Patchwork-Id: 80716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 61343B7124 for ; Fri, 28 Jan 2011 03:58:45 +1100 (EST) Received: (qmail 31248 invoked by alias); 27 Jan 2011 16:58:42 -0000 Received: (qmail 31228 invoked by uid 22791); 27 Jan 2011 16:58:41 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Jan 2011 16:58:36 +0000 Received: by iwn8 with SMTP id 8so2306416iwn.20 for ; Thu, 27 Jan 2011 08:58:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.199.212 with SMTP id et20mr1270582ibb.22.1296147514349; Thu, 27 Jan 2011 08:58:34 -0800 (PST) Received: by 10.231.160.68 with HTTP; Thu, 27 Jan 2011 08:58:34 -0800 (PST) Date: Thu, 27 Jan 2011 18:58:34 +0200 Message-ID: Subject: [Patch, libfortran] PR 47491 GETLOG thread-safety breaks Solaris bootstrap From: Janne Blomqvist To: Fortran List , GCC Patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, Rainer Orth reported that my recent patch to make the GETLOG intrinsic thread-safe by using getpwuid_r() broke bootstrap on Solaris. The reason is that Solaris has both the POSIX version and an older pre-standard version with a different signature. By default the old pre-standard version is used unless #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) The attached patch hopefully fixes this issue by calling the AC_USE_SYSTEM_EXTENSIONS macro which should set _POSIX_PTHREAD_SEMANTICS on Solaris. Regtested on x86_64-unknown-linux-gnu, Ok for trunk? 2011-01-27 Janne Blomqvist PR libfortran/47491 * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS to enable common extensions. * config.h.in: Regenerate. * configure: Regenerate. diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index 9b91f9a..dfbb37a 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -82,6 +82,8 @@ else LIBGFOR_IS_NATIVE=true fi +AC_USE_SYSTEM_EXTENSIONS + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir case ${version_specific_libs} in