From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2949 invoked by alias); 9 Aug 2012 23:32:52 -0000 Received: (qmail 2935 invoked by uid 22791); 9 Aug 2012 23:32:51 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 23:32:38 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SzcDV-0003Lu-Ff from joseph_myers@mentor.com ; Thu, 09 Aug 2012 16:32:37 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 9 Aug 2012 16:32:37 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 10 Aug 2012 00:32:34 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1SzcDS-0007Yz-53; Thu, 09 Aug 2012 23:32:34 +0000 Date: Thu, 09 Aug 2012 23:32:00 -0000 From: "Joseph S. Myers" To: CC: Subject: Define __ASSUME_UTIMES for more architectures Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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-08/txt/msg00089.txt.bz2 I looked at eliminating the __ASSUME_UTIMES macro, as one now defined for all supported kernel versions for many architectures. It turns out that it can't be eliminated because s390 didn't get the utimes syscall until 2.6.21-rc5 and hppa doesn't have that syscall at all - but am33 does have it in 2.6.25 and mips has it as of 2.6.0 or earlier. This patch makes the source tree reflect my conclusions about when this syscall is available (except for am33, where I'm leaving it for a resubmission of the updated am33 port to include a complete and accurate kernel-features.h for am33). (I'll commit the MIPS part now.) 2012-08-09 Joseph Myers * sysdeps/unix/sysv/linux/kernel-features.h [__s390__ && __LINUX_KERNEL_VERSION >= 0x020616] (__ASSUME_UTIMES): Define. ports/ChangeLog.mips 2012-08-09 Joseph Myers * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_UTIMES): Define. diff --git a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h index 996ba0a..62c1604 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -22,6 +22,9 @@ /* MIPS platforms had IPC64 all along. */ #define __ASSUME_IPC64 1 +/* MIPS had the utimes syscall by 2.6.0. */ +#define __ASSUME_UTIMES 1 + /* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */ #if __LINUX_KERNEL_VERSION >= 0x02061c # define __ASSUME_EVENTFD2 1 diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 21fba88..4dc2053 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -115,12 +115,14 @@ /* The utimes syscall has been available for some architectures forever. For x86 it was introduced after 2.5.75, for x86-64, - ppc, and ppc64 it was introduced in 2.6.0-test3. */ + ppc, and ppc64 it was introduced in 2.6.0-test3, for s390 it was + introduced in 2.6.21-rc5. */ #if defined __sparc__ \ || defined __i386__ \ || defined __x86_64__ \ || defined __powerpc__ \ - || defined __sh__ + || defined __sh__ \ + || (defined __s390__ && __LINUX_KERNEL_VERSION >= 0x020616) # define __ASSUME_UTIMES 1 #endif -- Joseph S. Myers joseph@codesourcery.com