ack/mach/minixST/libsys/_utime.c

30 lines
539 B
C
Raw Permalink Normal View History

/* _utime(2) for POSIX Authors: Terrence W. Holm & Edwin L. Froese */
#include <lib.h>
#define time _time
#include <time.h>
#define utime _utime
#include <utime.h>
1991-09-19 12:54:23 +00:00
long time();
PUBLIC int utime(name, timp)
char *name;
struct utimbuf *timp;
{
long current_time;
if (timp == (struct utimbuf *)NULL) {
current_time = time((long *)NULL);
_M.m2_l1 = current_time;
_M.m2_l2 = current_time;
} else {
_M.m2_l1 = timp->actime;
_M.m2_l2 = timp->modtime;
}
_M.m2_i1 = _len(name);
_M.m2_p1 = name;
return _callx(FS, UTIME);
}