This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Define __ASSUME_UTIMES for more architectures


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  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/kernel-features.h [__s390__ &&
	__LINUX_KERNEL_VERSION >= 0x020616] (__ASSUME_UTIMES): Define.

ports/ChangeLog.mips
2012-08-09  Joseph Myers  <joseph@codesourcery.com>

	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]