From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6301 invoked by alias); 5 Oct 2004 15:33:24 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 6281 invoked from network); 5 Oct 2004 15:33:24 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 5 Oct 2004 15:33:24 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i95FWX3j004389; Tue, 5 Oct 2004 17:32:33 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i95FWWSs004387; Tue, 5 Oct 2004 17:32:32 +0200 Date: Tue, 05 Oct 2004 15:33:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix ppc64 NPTL compilation Message-ID: <20041005153232.GG30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-10/txt/msg00007.txt.bz2 Hi! __timer_signal_thread_pclk declaration is now guarded with #if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 but #ifdef CLOCK_PROCESS_CPUTIME_ID is true on wider subset of architectures. I think #if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 implies #ifdef CLOCK_PROCESS_CPUTIME_ID so the following patch should DTRT. 2004-10-05 Jakub Jelinek * sysdeps/pthread/timer_create.c (timer_create): Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for THREAD_CPUTIME. --- libc/nptl/sysdeps/pthread/timer_create.c.jj 2004-10-05 09:04:47.000000000 +0200 +++ libc/nptl/sysdeps/pthread/timer_create.c 2004-10-05 17:04:53.536976849 +0200 @@ -38,10 +38,10 @@ timer_create (clock_id, evp, timerid) struct thread_node *thread = NULL; if (0 -#ifdef CLOCK_PROCESS_CPUTIME_ID +#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 || clock_id == CLOCK_PROCESS_CPUTIME_ID #endif -#ifdef CLOCK_THREAD_CPUTIME_ID +#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 || clock_id == CLOCK_THREAD_CPUTIME_ID #endif ) @@ -100,12 +100,12 @@ timer_create (clock_id, evp, timerid) default: thread = &__timer_signal_thread_rclk; break; -#ifdef CLOCK_PROCESS_CPUTIME_ID +#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 case CLOCK_PROCESS_CPUTIME_ID: thread = &__timer_signal_thread_pclk; break; #endif -#ifdef CLOCK_THREAD_CPUTIME_ID +#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0 case CLOCK_THREAD_CPUTIME_ID: thread = &__timer_signal_thread_tclk; break; Jakub