mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
v0.2.0
This commit is contained in:
+4
-4
@@ -165,12 +165,12 @@ close :: proc(fd: Handle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
read :: proc(fd: Handle, data: []byte) -> (int, Errno) {
|
read :: proc(fd: Handle, data: []byte) -> (int, Errno) {
|
||||||
sz := _unix_read(fd, ^data[0], len(data));
|
sz := _unix_read(fd, &data[0], len(data));
|
||||||
return sz, 0;
|
return sz, 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
write :: proc(fd: Handle, data: []byte) -> (int, Errno) {
|
write :: proc(fd: Handle, data: []byte) -> (int, Errno) {
|
||||||
sz := _unix_write(fd, ^data[0], len(data));
|
sz := _unix_write(fd, &data[0], len(data));
|
||||||
return sz, 0;
|
return sz, 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ stat :: proc(path: string) -> (Stat, int) #inline {
|
|||||||
s: Stat;
|
s: Stat;
|
||||||
cstr := strings.new_c_string(path);
|
cstr := strings.new_c_string(path);
|
||||||
defer free(cstr);
|
defer free(cstr);
|
||||||
ret_int := _unix_stat(cstr, ^s);
|
ret_int := _unix_stat(cstr, &s);
|
||||||
return s, int(ret_int);
|
return s, int(ret_int);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ exit :: proc(code: int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_thread_id :: proc() -> int {
|
current_thread_id :: proc() -> int {
|
||||||
// return cast(int) _unix_gettid();
|
// return int(_unix_gettid());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -169,7 +169,7 @@ close :: proc(fd: Handle) {
|
|||||||
write :: proc(fd: Handle, data: []byte) -> (AddressSize, Errno) {
|
write :: proc(fd: Handle, data: []byte) -> (AddressSize, Errno) {
|
||||||
assert(fd != -1);
|
assert(fd != -1);
|
||||||
|
|
||||||
bytes_written := unix_write(fd, ^data[0], len(data));
|
bytes_written := unix_write(fd, &data[0], len(data));
|
||||||
if(bytes_written == -1) {
|
if(bytes_written == -1) {
|
||||||
return 0, 1;
|
return 0, 1;
|
||||||
}
|
}
|
||||||
@@ -179,7 +179,7 @@ write :: proc(fd: Handle, data: []byte) -> (AddressSize, Errno) {
|
|||||||
read :: proc(fd: Handle, data: []byte) -> (AddressSize, Errno) {
|
read :: proc(fd: Handle, data: []byte) -> (AddressSize, Errno) {
|
||||||
assert(fd != -1);
|
assert(fd != -1);
|
||||||
|
|
||||||
bytes_read := unix_read(fd, ^data[0], len(data));
|
bytes_read := unix_read(fd, &data[0], len(data));
|
||||||
if(bytes_read == -1) {
|
if(bytes_read == -1) {
|
||||||
return 0, 1;
|
return 0, 1;
|
||||||
}
|
}
|
||||||
@@ -211,7 +211,7 @@ stat :: proc(path: string) -> (Stat, bool) #inline {
|
|||||||
s: Stat;
|
s: Stat;
|
||||||
cstr := strings.new_c_string(path);
|
cstr := strings.new_c_string(path);
|
||||||
defer free(cstr);
|
defer free(cstr);
|
||||||
ret_int := unix_stat(cstr, ^s);
|
ret_int := unix_stat(cstr, &s);
|
||||||
return s, ret_int==0;
|
return s, ret_int==0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ String get_fullpath_core(gbAllocator a, String path) {
|
|||||||
void init_build_context(void) {
|
void init_build_context(void) {
|
||||||
BuildContext *bc = &build_context;
|
BuildContext *bc = &build_context;
|
||||||
bc->ODIN_VENDOR = str_lit("odin");
|
bc->ODIN_VENDOR = str_lit("odin");
|
||||||
bc->ODIN_VERSION = str_lit("0.1.3");
|
bc->ODIN_VERSION = str_lit("0.2.0");
|
||||||
bc->ODIN_ROOT = odin_root_dir();
|
bc->ODIN_ROOT = odin_root_dir();
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_WINDOWS)
|
#if defined(GB_SYSTEM_WINDOWS)
|
||||||
|
|||||||
Reference in New Issue
Block a user