Commit Graph

30 Commits

Author SHA1 Message Date
Laytan Laats a4ac3cc6e8 fix os.read_dir closing the given file descriptor 2024-08-12 18:51:27 +02:00
gingerBill c078b2dd1b Add @(require_results) 2024-08-04 15:24:26 +01:00
gingerBill bf948ab8ae Add stubs for flush on platforms that didn't have it 2024-08-04 15:07:24 +01:00
gingerBill 7663a2036a Add read_at/write_at to missing platforms 2024-08-04 13:16:37 +01:00
gingerBill bdbbbf5c95 Fix typo; remove unneeded casts 2024-08-04 12:39:21 +01:00
gingerBill 97c499dbb4 Begin mapping os.Error in the rest of the codebase 2024-08-04 11:58:04 +01:00
gingerBill 28666414bc More clean ups of ERROR_NONE and != nil usage 2024-08-04 11:37:49 +01:00
gingerBill 29b6eebcd5 Clean up error handling 2024-08-04 11:21:09 +01:00
gingerBill 9f9abb8fb3 Use union #shared_nil for os.Error 2024-08-04 11:05:30 +01:00
gingerBill e60951a902 Begin converting os.Errno to be a nil-able type as a transition period 2024-08-04 10:51:08 +01:00
gingerBill c18c0a3364 Adhere to -vet-cast 2024-06-29 12:07:21 +01:00
gingerBill dd7c65a89c Merge pull request #2998 from laytan/os-improvements
OS improvements
2024-02-03 12:29:39 +00:00
gingerBill 6da82e038d Fix types for BSD 2024-01-28 23:27:30 +00:00
gingerBill 535b8a9483 Remove core:os dependency completely from base:runtime 2024-01-28 23:11:38 +00:00
gingerBill 038086d1d9 Alias heap calls from base:runtime is core:os 2024-01-28 22:47:55 +00:00
gingerBill 3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
Laytan Laats 9a1c4dc56d implement a max read/write at a time for non-windows (windows already has this) 2023-12-14 18:05:06 +01:00
gingerBill eb60ec3899 Fix unreachable error 2023-02-19 12:53:22 +00:00
gingerBill 986cba584e Add runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD where appropriate 2023-02-10 16:23:33 +00:00
gingerBill b6ca10cd5e Fix memory leak in os.get_current_directory on failure on *nix systems 2023-01-16 15:29:45 +00:00
Colin Davidson 6ff2db47b4 shuffle to private/public wrapper 2023-01-06 13:33:47 -08:00
Colin Davidson 50a2493fd3 add get thread count to openbsd 2023-01-05 01:48:00 -08:00
gingerBill ffe953b43d Make os.get_last_error contextless 2022-12-08 16:04:03 +00:00
gingerBill 7f601c9535 Add Allocator_Mode.Alloc_Non_Zerored 2022-09-22 12:12:57 +01:00
Jeroen van Rijn 426f02906b [sys/info] Add OpenBSD detection support. 2022-09-04 20:37:38 +02: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 5d190b15d7 Minor improvements to io and os 2022-05-05 15:30:07 +01: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
Sébastien Marie 5676c9e7eb initial OpenBSD support 2022-02-25 08:49:25 +00:00