From a1a6511e26e030009cd504c7e0e61fc6213678c6 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Fri, 22 Nov 2024 16:50:29 +0100 Subject: [PATCH] Remove "Timespec" --- lib/std/libc/libc.c3 | 6 ------ lib/std/libc/os/darwin.c3 | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/std/libc/libc.c3 b/lib/std/libc/libc.c3 index 61869034d..799fc7b9b 100644 --- a/lib/std/libc/libc.c3 +++ b/lib/std/libc/libc.c3 @@ -63,12 +63,6 @@ const bool BSD_FLAVOR_SIG @local = env::DARWIN || env::BSD_FAMILY; def Time_t = $typefrom(env::WIN32 ? long.typeid : CLong.typeid); def Off_t = $typefrom(env::WIN32 ? int.typeid : usz.typeid); -struct Timespec -{ - Time_t tv_sec; - CLong tv_nsec; -} - module libc @if(env::LIBC); extern fn void abort(); diff --git a/lib/std/libc/os/darwin.c3 b/lib/std/libc/os/darwin.c3 index 9c70a3ca7..ab632aae9 100644 --- a/lib/std/libc/os/darwin.c3 +++ b/lib/std/libc/os/darwin.c3 @@ -17,10 +17,10 @@ struct Stat Gid_t st_gid; Dev_t st_rdev; - Timespec st_atimespec; // time of last access - Timespec st_mtimespec; // time of last data modification - Timespec st_ctimespec; // time of last status change - Timespec st_birthtimespec; // time of file creation(birth) + TimeSpec st_atimespec; // time of last access + TimeSpec st_mtimespec; // time of last data modification + TimeSpec st_ctimespec; // time of last status change + TimeSpec st_birthtimespec; // time of file creation(birth) Off_t st_size; // file size, in bytes Blkcnt_t st_blocks; // blocks allocated for file Blksize_t st_blocksize; // optimal blocksize for I/O