]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Assume __NR_utimensat is always defined
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 23 Mar 2016 22:35:08 +0000 (23:35 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 23 Mar 2016 22:35:08 +0000 (23:35 +0100)
With the 2.6.32 minimum kernel on x86 and 3.2 on other architectures,
__NR_utimensat is always defined.

Changelog:
* sysdeps/unix/sysv/linux/futimens.c (futimens) [__NR_utimensat]:
Make code unconditional.
[!__NR_utimensat]: Remove conditional code.
* sysdeps/unix/sysv/linux/lutimes.c (lutimes) [__NR_utimensat]:
Make code unconditional.
[!__NR_utimensat]: Remove conditional code.
* sysdeps/unix/sysv/linux/utimensat.c (utimensat) [__NR_utimensat]:
Make code unconditional.
[!__NR_utimensat]: Remove conditional code.

ChangeLog
sysdeps/unix/sysv/linux/futimens.c
sysdeps/unix/sysv/linux/lutimes.c
sysdeps/unix/sysv/linux/utimensat.c

index ce633e7649a6d436c802c8e31cfb6c3313656d3e..da349c01ea81b0022cdb07380dfe99e1facb7cc5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2016-03-23  Aurelien Jarno  <aurelien@aurel32.net>
+
+       * sysdeps/unix/sysv/linux/futimens.c (futimens) [__NR_utimensat]:
+       Make code unconditional.
+       [!__NR_utimensat]: Remove conditional code.
+       * sysdeps/unix/sysv/linux/lutimes.c (lutimes) [__NR_utimensat]:
+       Make code unconditional.
+       [!__NR_utimensat]: Remove conditional code.
+       * sysdeps/unix/sysv/linux/utimensat.c (utimensat) [__NR_utimensat]:
+       Make code unconditional.
+       [!__NR_utimensat]: Remove conditional code.
+
 2016-03-23  Aurelien Jarno  <aurelien@aurel32.net>
 
        * sysdeps/unix/sysv/linux/dl-openat64.c (openat64) [__NR_openat]:
index 3176e65eaf0a6d5c857e95bb50be480c4c38d215..3f9621001934881a6ff0ced59e66f9470dde0b90 100644 (file)
 int
 futimens (int fd, const struct timespec tsp[2])
 {
-#ifdef __NR_utimensat
   if (fd < 0)
     return INLINE_SYSCALL_ERROR_RETURN_VALUE (EBADF);
   /* Avoid implicit array coercion in syscall macros.  */
   return INLINE_SYSCALL (utimensat, 4, fd, NULL, &tsp[0], 0);
-#else
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
-#endif
 }
-#ifndef __NR_utimensat
-stub_warning (futimens)
-#endif
index 69d3cfa0b380354841410c9769dc97a21a70bd23..49fad3e8ebc277315e86efe4b93b6103bc1bf1a6 100644 (file)
@@ -27,7 +27,6 @@
 int
 lutimes (const char *file, const struct timeval tvp[2])
 {
-#ifdef __NR_utimensat
   /* The system call espects timespec, not timeval.  */
   struct timespec ts[2];
   if (tvp != NULL)
@@ -42,11 +41,4 @@ lutimes (const char *file, const struct timeval tvp[2])
 
   return INLINE_SYSCALL (utimensat, 4, AT_FDCWD, file, tvp ? ts : NULL,
                         AT_SYMLINK_NOFOLLOW);
-#else
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
-#endif
 }
-
-#ifndef __NR_utimensat
-stub_warning (lutimes)
-#endif
index f3a9697a1748ee0ba1263d1f1cf2b61084ceec76..89af2f516b4d0801dcbab7c87646b5bd55c646fa 100644 (file)
@@ -31,13 +31,6 @@ utimensat (int fd, const char *file, const struct timespec tsp[2],
 {
   if (file == NULL)
     return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
-#ifdef __NR_utimensat
   /* Avoid implicit array coercion in syscall macros.  */
   return INLINE_SYSCALL (utimensat, 4, fd, file, &tsp[0], flags);
-#else
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
-#endif
 }
-#ifndef __NR_utimensat
-stub_warning (utimensat)
-#endif