home *** CD-ROM | disk | FTP | other *** search
- /* utimes.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
-
- #include <sys/emx.h>
- #include <sys/time.h>
- #include <time.h>
-
- int utimes (const char *name, const struct timeval *tvp)
- {
- struct timeval tv[2];
-
- if (tvp == NULL)
- {
- tv[0].tv_sec = tv[1].tv_sec = time (NULL);
- tv[0].tv_usec = tv[1].tv_usec = 0;
- }
- else
- {
- tv[0] = tvp[0];
- tv[1] = tvp[1];
- }
- if (!_tzset_flag) tzset ();
- tv[0].tv_sec -= timezone;
- tv[1].tv_sec -= timezone;
- return (__utimes (name, tv));
- }
-