Commit Graph

298 Commits

Author SHA1 Message Date
gingerBill
e45401bfb4 Fix #2207 2022-11-23 14:14:22 +00:00
gingerBill
f76316f889 Merge branch 'master' into allocator-mode-alloc-non-zeroed 2022-11-03 12:47:11 +00:00
gingerBill
32477a88ef Merge pull request #2165 from JopStro/master
Implement os open for wasi_wasm32 target
2022-11-03 12:43:55 +00:00
Jeroen van Rijn
0ca773114a Fix os.read implementation on Windows. 2022-11-02 16:48:39 +01:00
JopStro
18d7ecc1a5 wasi: Add FD_FILESTAT_GET to default file open rights 2022-11-01 12:56:36 +00:00
JopStro
91ad6b42c5 rename default_dir to current_dir 2022-10-31 21:46:47 +00:00
JopStro
71eb21aab7 implement open for wasi_wasm32 target 2022-10-31 21:21:10 +00:00
Colin Davidson
0e7109cab2 terminate read if we read EOF 2022-10-31 06:08:18 -07:00
gingerBill
62ab2987b6 Change name to windows_set_file_info_times 2022-10-26 16:08:49 +01:00
gingerBill
7bcde35651 Heavily improve time handling on Windows for time.now() and os.File_Info 2022-10-26 16:05:49 +01:00
Phuk Ng Yu
8b06fd0935 os2/file_windows fix 2022-10-07 00:06:46 -07:00
Vitalii Kravchenko
d52a9b61af Fix indentation 2022-10-02 07:47:22 +01:00
Vitalii Kravchenko
8a5b39f734 Darwin: allow reading/writing files larger than max(i32) 2022-10-02 07:40:28 +01:00
gingerBill
c767d55e9a Fix typo 2022-09-22 12:21:43 +01:00
gingerBill
7f601c9535 Add Allocator_Mode.Alloc_Non_Zerored 2022-09-22 12:12:57 +01:00
Vitaly Kravchenko
d469c2da48 Fix indent 2022-09-21 17:31:37 +01:00
gingerBill
f50fc33749 Clean up of the core library to make the stream vtables not be pointers directly. 2022-09-15 10:00:50 +01:00
Jeroen van Rijn
426f02906b [sys/info] Add OpenBSD detection support. 2022-09-04 20:37:38 +02:00
Ricardo Silva
706d0c3a91 Fix allocation on darwin absolute_path_from_handle 2022-09-02 11:30:32 +01:00
gingerBill
cb9e16f4df Correct syscalls for linux_i386 2022-08-24 12:37:56 +01:00
Ian Lilley
dbec4b0d0e fixed memory leak from calling get_env 2022-08-03 11:49:42 -04:00
gingerBill
3db3047f47 Minor improvements 2022-07-19 16:17:23 +01:00
gingerBill
9eb3da0474 Remove import cycle on FreeBSD 2022-07-18 15:20:28 +01:00
Peter DV
e58f45bef7 Correct error reporting 2022-06-27 11:26:34 +10:00
Ian Lilley
dda2ed290a tidying up Query_Info return value when not in query features 2022-06-01 22:40:39 -04:00
William Roe
bb4329711c [os] Darwin: Add os.exists() 2022-05-28 15:21:07 +01:00
William Roe
54a326f046 [os] Darwin,FreeBSD,OpenBSD: Rename os.getenv to os.get_env
Make os.get_env consistent across Unixes

This matches the function name and API from env_windows.odin and os_linux.odin, which should be the same everywhere. Meaning:

* named get_env and not getenv
* return a string (empty if the environment variable is not found)
* accept a default value parameter for the allocator (defaulting to context.allocator)
* calls lookup_env which returns an extra found boolean value

This is so that you don't have to write platform/OS conditionals when getting environment variable values from the stdlib os.get_env/getenv function.
2022-05-23 13:48:55 +01:00
gingerBill
5609221831 Merge pull request #1792 from jasonKercher/os2_linux
Os2 linux
2022-05-22 17:18:28 +01:00
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
jason
5a6836ab99 match user.odin and env.odin to master 2022-05-16 15:28:56 -04:00
jason
d1499f3f78 make -vet happy 2022-05-16 13:57:12 -04:00
jason
fff23e2bbb merge from upstream and convert to ^File types 2022-05-16 13:49:57 -04: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
jason
97d1a67871 make vet happy, thread_local heap 2022-05-04 18:45:39 -04:00
jason
bac96cf2ad fix mmap_to_region 2022-05-04 18:32:14 -04:00
jason
7e0cc0af25 heap_linux.odin 2022-05-04 17:55:15 -04:00
CiD-
56737c1431 merge upstream/master 2022-04-08 13:50:06 -04:00