Thomas Veerman 92b61c816d Fix many more comiler warnings
Most warnings were harmless, some real bugs. Test set should now compile
cleanly with ack, gcc, and clang.
2011-11-28 10:07:55 +00:00

25 lines
558 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(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 *) __UNCONST(name);
return(_syscall(VFS_PROC_NR, UTIME, &m));
}