Get all tests passing on NetBSD

This commit is contained in:
Justine Tunney 2021-02-05 09:44:54 -08:00
parent 23ae9dfceb
commit b2cd58a322
41 changed files with 202 additions and 655 deletions

View file

@ -19,7 +19,7 @@
#include "libc/fmt/conv.h"
#include "libc/nt/struct/filetime.h"
int64_t filetimetotime(struct NtFileTime ft) {
textwindows int64_t filetimetotime(struct NtFileTime ft) {
uint64_t t = (uint64_t)ft.dwHighDateTime << 32 | ft.dwLowDateTime;
return (t - MODERNITYSECONDS * HECTONANOSECONDS) / HECTONANOSECONDS;
}

View file

@ -23,7 +23,7 @@
/**
* Converts Windows COBOL timestamp to UNIX epoch in nanoseconds.
*/
struct timespec FileTimeToTimeSpec(struct NtFileTime ft) {
textwindows struct timespec FileTimeToTimeSpec(struct NtFileTime ft) {
uint64_t x;
x = ft.dwHighDateTime;
x <<= 32;

View file

@ -21,7 +21,7 @@
#include "libc/fmt/conv.h"
#include "libc/nt/struct/filetime.h"
void FileTimeToTimeVal(struct timeval *tv, struct NtFileTime ft) {
textwindows void FileTimeToTimeVal(struct timeval *tv, struct NtFileTime ft) {
uint64_t x;
x = ft.dwHighDateTime;
x <<= 32;