mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Assume __NR_utimensat is always defined
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.
This commit is contained in:
12
ChangeLog
12
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>
|
2016-03-23 Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/dl-openat64.c (openat64) [__NR_openat]:
|
* sysdeps/unix/sysv/linux/dl-openat64.c (openat64) [__NR_openat]:
|
||||||
|
@@ -31,15 +31,8 @@
|
|||||||
int
|
int
|
||||||
futimens (int fd, const struct timespec tsp[2])
|
futimens (int fd, const struct timespec tsp[2])
|
||||||
{
|
{
|
||||||
#ifdef __NR_utimensat
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EBADF);
|
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EBADF);
|
||||||
/* Avoid implicit array coercion in syscall macros. */
|
/* Avoid implicit array coercion in syscall macros. */
|
||||||
return INLINE_SYSCALL (utimensat, 4, fd, NULL, &tsp[0], 0);
|
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
|
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
int
|
int
|
||||||
lutimes (const char *file, const struct timeval tvp[2])
|
lutimes (const char *file, const struct timeval tvp[2])
|
||||||
{
|
{
|
||||||
#ifdef __NR_utimensat
|
|
||||||
/* The system call espects timespec, not timeval. */
|
/* The system call espects timespec, not timeval. */
|
||||||
struct timespec ts[2];
|
struct timespec ts[2];
|
||||||
if (tvp != NULL)
|
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,
|
return INLINE_SYSCALL (utimensat, 4, AT_FDCWD, file, tvp ? ts : NULL,
|
||||||
AT_SYMLINK_NOFOLLOW);
|
AT_SYMLINK_NOFOLLOW);
|
||||||
#else
|
|
||||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __NR_utimensat
|
|
||||||
stub_warning (lutimes)
|
|
||||||
#endif
|
|
||||||
|
@@ -31,13 +31,6 @@ utimensat (int fd, const char *file, const struct timespec tsp[2],
|
|||||||
{
|
{
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
|
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
|
||||||
#ifdef __NR_utimensat
|
|
||||||
/* Avoid implicit array coercion in syscall macros. */
|
/* Avoid implicit array coercion in syscall macros. */
|
||||||
return INLINE_SYSCALL (utimensat, 4, fd, file, &tsp[0], flags);
|
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
|
|
||||||
|
Reference in New Issue
Block a user