From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16739 invoked by alias); 30 May 2012 23:11:36 -0000 Received: (qmail 16721 invoked by uid 22791); 30 May 2012 23:11:35 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 May 2012 23:11:10 +0000 Received: by pbbrp2 with SMTP id rp2so634221pbb.0 for ; Wed, 30 May 2012 16:11:09 -0700 (PDT) Received: by 10.68.212.197 with SMTP id nm5mr510663pbc.110.1338419469690; Wed, 30 May 2012 16:11:09 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id mt9sm1968038pbb.14.2012.05.30.16.11.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 May 2012 16:11:09 -0700 (PDT) From: Richard Henderson To: libc-ports@sourceware.org Subject: [PATCH 3/4] alpha: Avoid fgets plt entry Date: Wed, 30 May 2012 23:11:00 -0000 Message-Id: <1338419462-7572-3-git-send-email-rth@twiddle.net> In-Reply-To: <1338419462-7572-1-git-send-email-rth@twiddle.net> References: <1338419462-7572-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00200.txt.bz2 And since the FILE is function local, avoid locking too. --- ChangeLog.alpha | 3 +++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e327242..246345a 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-05-30 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use + fgets_unlocked. + * sysdeps/alpha/Implies: Include ieee754/dbl-64/wordsize-64. * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding. diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 8b6c830..686c7ed 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -504,7 +504,7 @@ process_cpuinfo(struct cpuinfo_data *data) while (1) { - if (fgets (dummy, 256, fp) == NULL) + if (fgets_unlocked (dummy, 256, fp) == NULL) break; if (!got_type && sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) -- 1.7.7.6