mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-27 04:50:28 +00:00
Get all tests passing on NetBSD
This commit is contained in:
parent
23ae9dfceb
commit
b2cd58a322
41 changed files with 202 additions and 655 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue