Built win.arm64 against r3658
[kbuild-mirror.git] / src / kmk / kbuildprf.c
blob9fb4b9773c497eafa0ef31c8a85801e74aabe636
1 #include <stdio.h>
2 #include <io.h>
3 #include <errno.h>
4 #include <Windows.h>
6 __int64 prf_now(void)
8 return GetTickCount();
11 #undef open
12 int prf_open(const char *name, int of, int mask)
14 int fd;
15 // int err;
16 // __int64 t = prf_now();
17 fd = _open(name, of, mask);
18 // err = errno;
19 // t = prf_now() - t;
20 // fprintf(stderr, "open(%s, %#x) -> %d/%d in %lu\n", name, of, fd, err, (long)t);
21 // errno = err;
22 return fd;
25 #undef close
26 int prf_close(int fd)
28 int rc;
29 rc = _close(fd);
30 return rc;
34 #undef read
35 int prf_read(int fd, void *buf, long cb)
37 int cbRead;
38 cbRead = _read(fd, buf, cb);
39 return cbRead;
42 #undef lseek
43 long prf_lseek(int fd, long off, int whence)
45 long rc;
46 rc = _lseek(fd, off, whence);
47 return rc;