mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-05 04:27:51 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -186,7 +186,7 @@ RTLD_FIRST :: 0x100;
|
||||
// "Argv" arguments converted to Odin strings
|
||||
args := _alloc_command_line_arguments();
|
||||
|
||||
_File_Time :: struct {
|
||||
Unix_File_Time :: struct {
|
||||
seconds: i64,
|
||||
nanoseconds: i64,
|
||||
}
|
||||
@@ -200,10 +200,10 @@ Stat :: struct {
|
||||
gid: u32, // Group ID of the file's group
|
||||
rdev: i32, // Device ID, if device
|
||||
|
||||
last_access: _File_Time, // Time of last access
|
||||
modified: _File_Time, // Time of last modification
|
||||
status_change: _File_Time, // Time of last status change
|
||||
created: _File_Time, // Time of creation
|
||||
last_access: Unix_File_Time, // Time of last access
|
||||
modified: Unix_File_Time, // Time of last modification
|
||||
status_change: Unix_File_Time, // Time of last status change
|
||||
created: Unix_File_Time, // Time of creation
|
||||
|
||||
size: i64, // Size of the file, in bytes
|
||||
blocks: i64, // Number of blocks allocated for the file
|
||||
|
||||
@@ -144,7 +144,7 @@ RTLD_NOLOAD :: 0x02000;
|
||||
|
||||
args := _alloc_command_line_arguments();
|
||||
|
||||
_File_Time :: struct {
|
||||
Unix_File_Time :: struct {
|
||||
seconds: i64,
|
||||
nanoseconds: c.long,
|
||||
}
|
||||
@@ -162,10 +162,10 @@ Stat :: struct {
|
||||
_padding1: i32,
|
||||
rdev: u64,
|
||||
|
||||
last_access: File_Time,
|
||||
modified: File_Time,
|
||||
status_change: File_Time,
|
||||
birthtime: File_Time,
|
||||
last_access: Unix_File_Time,
|
||||
modified: Unix_File_Time,
|
||||
status_change: Unix_File_Time,
|
||||
birthtime: Unix_File_Time,
|
||||
|
||||
size: i64,
|
||||
blocks: i64,
|
||||
@@ -328,7 +328,8 @@ last_write_time :: proc(fd: Handle) -> (File_Time, Errno) {
|
||||
if err != ERROR_NONE {
|
||||
return 0, err;
|
||||
}
|
||||
return File_Time(s.modified), ERROR_NONE;
|
||||
modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
|
||||
return File_Time(modified), ERROR_NONE;
|
||||
}
|
||||
|
||||
last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
|
||||
@@ -336,7 +337,8 @@ last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
|
||||
if err != ERROR_NONE {
|
||||
return 0, err;
|
||||
}
|
||||
return File_Time(s.modified), ERROR_NONE;
|
||||
modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
|
||||
return File_Time(modified), ERROR_NONE;
|
||||
}
|
||||
|
||||
stat :: inline proc(path: string) -> (Stat, Errno) {
|
||||
|
||||
@@ -179,7 +179,7 @@ RTLD_GLOBAL :: 0x100;
|
||||
// "Argv" arguments converted to Odin strings
|
||||
args := _alloc_command_line_arguments();
|
||||
|
||||
_File_Time :: struct {
|
||||
Unix_File_Time :: struct {
|
||||
seconds: i64,
|
||||
nanoseconds: i64,
|
||||
}
|
||||
@@ -197,9 +197,9 @@ Stat :: struct {
|
||||
block_size: i64, // Optimal bllocksize for I/O
|
||||
blocks: i64, // Number of 512-byte blocks allocated
|
||||
|
||||
last_access: File_Time, // Time of last access
|
||||
status_change: File_Time, // Time of last status change
|
||||
modified: File_Time, // Time of last modification
|
||||
last_access: Unix_File_Time, // Time of last access
|
||||
modified: Unix_File_Time, // Time of last modification
|
||||
status_change: Unix_File_Time, // Time of last status change
|
||||
|
||||
_reserve1,
|
||||
_reserve2,
|
||||
@@ -364,7 +364,8 @@ last_write_time :: proc(fd: Handle) -> (File_Time, Errno) {
|
||||
if err != ERROR_NONE {
|
||||
return 0, err;
|
||||
}
|
||||
return File_Time(s.modified), ERROR_NONE;
|
||||
modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
|
||||
return File_Time(modified), ERROR_NONE;
|
||||
}
|
||||
|
||||
last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
|
||||
@@ -372,7 +373,8 @@ last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) {
|
||||
if err != ERROR_NONE {
|
||||
return 0, err;
|
||||
}
|
||||
return File_Time(s.modified), ERROR_NONE;
|
||||
modified := s.modified.seconds * 1_000_000_000 + s.modified.nanoseconds;
|
||||
return File_Time(modified), ERROR_NONE;
|
||||
}
|
||||
|
||||
stat :: inline proc(path: string) -> (Stat, Errno) {
|
||||
|
||||
Reference in New Issue
Block a user