public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: <libc-alpha@sourceware.org>
Cc: <libc-ports@sourceware.org>
Subject: Define __ASSUME_UTIMES for more architectures
Date: Thu, 09 Aug 2012 23:32:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1208092330560.21255@digraph.polyomino.org.uk> (raw)

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

                 reply	other threads:[~2012-08-09 23:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1208092330560.21255@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).