
This patch mainly copies and modifies files existing in the current libc implementing minix specific functions. To keep consisten with the NetBSD libc, we remove namespace stubs and we use "namespace.h" and weak links.
27 lines
561 B
C
27 lines
561 B
C
/* utime(2) for POSIX Authors: Terrence W. Holm & Edwin L. Froese */
|
|
|
|
#include <sys/cdefs.h>
|
|
#include "namespace.h"
|
|
#include <lib.h>
|
|
|
|
#include <string.h>
|
|
#include <utime.h>
|
|
|
|
PUBLIC int utime(name, timp)
|
|
_CONST char *name;
|
|
_CONST struct utimbuf *timp;
|
|
{
|
|
message m;
|
|
|
|
if (timp == NULL) {
|
|
m.m2_i1 = 0; /* name size 0 means NULL `timp' */
|
|
m.m2_i2 = strlen(name) + 1; /* actual size here */
|
|
} else {
|
|
m.m2_l1 = timp->actime;
|
|
m.m2_l2 = timp->modtime;
|
|
m.m2_i1 = strlen(name) + 1;
|
|
}
|
|
m.m2_p1 = (char *) name;
|
|
return(_syscall(VFS_PROC_NR, UTIME, &m));
|
|
}
|