Commit Graph

243 Commits

Author SHA1 Message Date
Jeroen van Rijn
db8d119cad Fix Windows os.make_directory. 2022-05-20 19:15:13 +02:00
Tetralux
57167be2a6 [os] Linux: os.unset_env() 2022-05-18 07:12:30 +00:00
gingerBill
33895b6d92 Convert all uses of *_from_slice to *_from_bytes where appropriate 2022-05-16 01:43:43 +01:00
gingerBill
ed60ed3bae Merge pull request #1789 from Tetralux/os-patch
[os] Linux: Add os.exists(), os.get_env(), os.lookup_env(), os.set_env()
2022-05-15 20:49:55 +01:00
Tetralux
b5b329378f [os] Linux: Add os.exists(), os.get_env(), os.lookup_env(), os.set_env()
exists() does the access() syscall.

Renames getenv() to get_env() to match Windows.
2022-05-14 20:14:10 +00:00
gingerBill
dd56c85e55 Merge pull request #1784 from yay/os-darwin-fixes
os_darwin.odin fixes
2022-05-13 10:10:05 +01:00
Vitaly Kravchenko
9e2a847ebc Typo fix 2022-05-13 09:32:04 +01:00
Vitaly Kravchenko
daef39a206 os_darwin.odin fixes 2022-05-13 09:27:15 +01:00
gingerBill
f002857edc Clean up core:time to be consistent across all platforms 2022-05-12 15:47:24 +01:00
gingerBill
eef44b11f3 Make the utf16 conversion procedures in core:sys/windows safer by checking for memory leaks 2022-05-12 13:17:58 +01:00
gingerBill
bb4f108487 Update error handling for os2 on windows 2022-05-12 12:54:27 +01:00
gingerBill
8b4b81fdeb Fill in most of os2/file_windows.odin 2022-05-12 11:33:01 +01:00
gingerBill
96ab17ecfc Begin mocking os2 for windows out more 2022-05-05 18:01:44 +01:00
gingerBill
18bde22b26 Go to a File based approach over Handle based 2022-05-05 16:15:03 +01:00
gingerBill
5d190b15d7 Minor improvements to io and os 2022-05-05 15:30:07 +01:00
gingerBill
a4d2ff05a9 Merge pull request #1688 from bkrypt/fix_file_windows_open_create_append_order
os/file_windows: Fix "create or append" file open behavior
2022-04-05 12:29:20 +01:00
gingerBill
48012ec73c Merge pull request #1679 from Tetralux/fix-std-handle
Have get_std_handle() no longer make the handles uninheritable
2022-04-05 12:15:14 +01:00
bkrypt
e80bee6867 Change order of O_CREATE & O_APPEND checks 2022-04-02 21:55:01 +02:00
Tetralux
c686133172 Have get_std_handle() no longer make the handles uninheritable
This caused all handles returned by GetStdHandle() to also not be inheritable,
which prevents you from handing them to child processes that you might create.

This fixes that.
2022-03-31 17:03:12 +00:00
gingerBill
4eb4ae6305 Replace sync with sync2 2022-03-30 17:42:44 +01:00
Jeroen van Rijn
df32b5b46c [windows] Fix leak in glob. 2022-03-29 16:13:17 +02:00
gingerBill
633157f4f8 Merge pull request #1613 from semarie/linux_arm64
fix Linux arm64 support
2022-03-14 11:37:45 +00:00
gingerBill
fc0291d745 Merge pull request #1526 from odin-lang/freestanding_amd64
Freestanding target for amd64
2022-03-14 11:09:52 +00:00
gingerBill
a7adb2fb6e Merge branch 'master' into freestanding_amd64 2022-03-14 11:02:59 +00:00
Sébastien Marie
036900da51 fix mode_t on darwin
- fix mkdir() prototype (mode_t is u16)
- remove explicit cast
2022-03-13 12:41:03 +00:00
Sébastien Marie
ca67cf032c freebsd_amd64 support 2022-03-13 11:42:42 +00:00
Sébastien Marie
8982ae34e3 fix linux_arm64
- SYS_fork doesn't exist, uses SYS_clone
- properly cast AT_FDCWD to uintptr
2022-03-12 09:19:52 +00:00
gingerBill
e6d3e893a5 Merge pull request #1602 from hoanga/freebsd-build-support
update to build for freebsd
2022-03-12 08:45:53 +00:00
gingerBill
6d1a91f5b3 Fix typo 2022-03-09 15:11:38 +00:00
gingerBill
17eebf338c Fix #1606 (Call runtime._cleanup_runtime_contextless() for os.exit) 2022-03-09 15:05:51 +00:00
Al Hoang
0278ac85a0 update to build for FreeBSD 2022-03-08 23:48:25 -06:00
gingerBill
31959b0751 Correct cleanpath_from_handle for os.fstat 2022-03-08 10:01:44 +00:00
gingerBill
dd9843aa21 Merge pull request #1557 from semarie/openbsd-support
initial OpenBSD support
2022-02-28 14:23:56 +00:00
gingerBill
45124e4d5c Merge branch 'master' into freestanding_amd64 2022-02-28 12:32:51 +00:00
gingerBill
e9f901b82d Keep -vet happy 2022-02-25 15:30:24 +00:00
gingerBill
ed3004f8a0 Correct read_console reading 2022-02-25 15:30:05 +00:00
gingerBill
d97df080f9 Revert change 2022-02-25 15:08:02 +00:00
gingerBill
0e5c7e08fc Change < to <= 2022-02-25 14:54:35 +00:00
gingerBill
376906e0ae Merge branch 'master' of https://github.com/odin-lang/Odin 2022-02-25 12:02:49 +00:00
gingerBill
47c79a2f25 Correct os.read on windows for os.stdin 2022-02-25 12:02:41 +00:00
gingerBill
32988b0363 Correct internals for os.read on windows (read_console) for os.stdin (Fix #1556) 2022-02-25 12:01:53 +00:00
Sébastien Marie
5676c9e7eb initial OpenBSD support 2022-02-25 08:49:25 +00:00
Jeroen van Rijn
3a469dc13e Merge pull request #1549 from semarie/clone_to_cstring-leak
delete allocated memory with clone_to_cstring
2022-02-24 12:42:15 +01:00
Sébastien Marie
d3c70f2206 remove the optional ; in os_freebsd.odin 2022-02-24 11:30:33 +00:00
Sébastien Marie
14f1793b3e use context.temp_allocator instead of general allocation + delete()
where clone_to_cstring is used with foreign code, it is prefered to use `context.temp_allocator` instead of using the general allocator and manually delete the memory after use.
2022-02-24 11:28:42 +00:00
Colin Davidson
aeaf1199ec Add make_directory so darwin can build html docs 2022-02-24 01:13:51 -08:00
Colin Davidson
54a6637d38 Use the _unix_fstat pointer to avoid 144B copies on fileIO 2022-02-18 20:50:49 -08:00
Colin Davidson
536bf61323 avoid memset on stats 2022-02-16 08:14:11 -08:00
Jeroen van Rijn
855e7beab1 Merge pull request #1488 from colrdavidson/master
Add fork and personality
2022-02-15 21:04:09 +01:00
gingerBill
d695a8a526 Update os_darwin.odin 2022-02-15 16:02:14 +00:00