diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-01-30 09:30:09 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-01-30 09:30:09 +0000 |
commit | 3e543bc56346540cbf73fd48d0172fc6a588efd5 (patch) | |
tree | b2c3502b6596d238ac861cc82cafdc6f8b84e143 /sysdeps/unix/sysv/linux/futimesat.c | |
parent | 06f313e361a523605ba6d4c9cdc67a7353cd367c (diff) | |
download | glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.tar glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.tar.gz glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.tar.bz2 glibc-3e543bc56346540cbf73fd48d0172fc6a588efd5.zip |
Updated to fedora-glibc-20060130T0922
Diffstat (limited to 'sysdeps/unix/sysv/linux/futimesat.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/futimesat.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c index be148b8d7a..514f456927 100644 --- a/sysdeps/unix/sysv/linux/futimesat.c +++ b/sysdeps/unix/sysv/linux/futimesat.c @@ -35,6 +35,24 @@ futimesat (fd, file, tvp) const char *file; const struct timeval tvp[2]; { + int result; + +#ifdef __NR_futimesat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS char *buf = NULL; if (file == NULL) @@ -70,24 +88,23 @@ futimesat (fd, file, tvp) file = buf; } - int result; INTERNAL_SYSCALL_DECL (err); -#ifdef __NR_utimes +# ifdef __NR_utimes result = INTERNAL_SYSCALL (utimes, err, 2, file, tvp); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; -# ifndef __ASSUME_UTIMES +# ifndef __ASSUME_UTIMES if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) goto fail; +# endif # endif -#endif /* The utimes() syscall does not exist or is not available in the used kernel. Use utime(). For this we have to convert to the data format utime() expects. */ -#ifndef __ASSUME_UTIMES +# ifndef __ASSUME_UTIMES struct utimbuf tmp; struct utimbuf *times; @@ -105,9 +122,10 @@ futimesat (fd, file, tvp) return result; fail: -#endif +# endif __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); return -1; +#endif } |