summaryrefslogtreecommitdiff
path: root/sysdeps/unix/utime.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-08 07:53:36 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-08 07:53:36 +0000
commit972e719e8154eec5f543b027e2a08dfa285d55d5 (patch)
treed41e16b1b9b5f083132e9692611f13bc1886fa7a /sysdeps/unix/utime.c
parent9b1b33cea3ac0ae4eec04e86b1b489aeb5d2f552 (diff)
downloadglibc-972e719e8154eec5f543b027e2a08dfa285d55d5.tar.gz
Update.
2002-05-24 Robert Love <rml@tech9.net> * posix/Makefile (routines): Add sched_getaffinity and sched_setaffinity. * posix/sched.h: Add declarations for sched_getaffinity and sched_setaffinity. * sysdeps/generic/sched_getaffinity.c: New file. * sysdeps/generic/sched_setaffinity.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add sched_getaffinity and sched_setaffinity. 2002-08-06 Andreas Schwab <schwab@suse.de> * sysdeps/unix/utime.c: If TIMES is NULL pass it through to utimes.
Diffstat (limited to 'sysdeps/unix/utime.c')
-rw-r--r--sysdeps/unix/utime.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sysdeps/unix/utime.c b/sysdeps/unix/utime.c
index cbfc351337..4a1815b2c7 100644
--- a/sysdeps/unix/utime.c
+++ b/sysdeps/unix/utime.c
@@ -32,21 +32,19 @@ utime (file, times)
const struct utimbuf *times;
{
struct timeval timevals[2];
+ struct timeval *tvp;
if (times != NULL)
{
- timevals[0].tv_sec = (long int) times->actime;
+ timevals[0].tv_sec = (time_t) times->actime;
timevals[0].tv_usec = 0L;
- timevals[1].tv_sec = (long int) times->modtime;
+ timevals[1].tv_sec = (time_t) times->modtime;
timevals[1].tv_usec = 0L;
+ tvp = timevals;
}
else
- {
- if (__gettimeofday (&timevals[0], NULL) < 0)
- return -1;
- timevals[1] = timevals[0];
- }
+ tvp = NULL;
- return __utimes (file, timevals);
+ return __utimes (file, tvp);
}
libc_hidden_def (utime)