Dave Voutila
18988b5f94
Fix use of errno on OpenBSD.
2025-03-27 10:36:40 -04:00
Colin Davidson
4c8e355444
tweaks per laytan suggestions
2024-10-10 09:14:29 -07:00
Yuriy Grynevych
18fd1fefc3
Update core/os/os_openbsd.odin
...
Co-authored-by: Laytan <laytanlaats@hotmail.com >
2024-09-19 00:11:17 +03:00
Yuriy Grynevych
4ff836609c
[core/os] get_current_directory: Add allocator arg to targets where its missing
2024-09-18 21:03:48 +03:00
Feoramund
6aedb2695a
Report Invalid_Whence on some os platforms
...
- Move `Seek`-related checks into OS-specific files for granularity.
Platforms:
- Darwin
- FreeBSD
- Haiku
- Linux
- NetBSD
- OpenBSD
2024-08-28 19:53:20 +02:00
Feoramund
0243647e15
Add missing flush functionality to os platforms
...
Platforms:
- FreeBSD
- Haiku
- Linux
- NetBSD
- OpenBSD
2024-08-28 19:53:20 +02:00
Feoramund
eb92a2df71
Fix indentation
2024-08-28 19:53:20 +02:00
Feoramund
d60f404bb4
Fix OpenBSD implementations of read_at and write_at
2024-08-28 19:53:20 +02:00
Laytan Laats
f7d7d65bc0
fix open bindings
...
`open` specifies the `mode` argument as vararg (presumably to make it
optional). varargs actually have rules about casting, in this case the
rule that any integer arg of size <= 4 has to be casted to `i32` before
passing it.
Not doing that implicit cast makes the permissions wrong or not apply at
all.
2024-08-16 22:54:53 +02:00
Laytan Laats
efe68c2e24
posix: add package
2024-08-14 01:44:35 +02:00
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