Commit Graph

5934 Commits

Author SHA1 Message Date
Jeroen van Rijn
ad8bff4d3a Make O_RDONLY default for os.open on all platforms.
And also moved Windows file procs to `os_windows.odin`, in line with all the other platforms who didn't have a dedicated `file_<platform>.odin`
2024-12-01 11:54:56 +11:00
Evan Martinez
486a650630 Fix binomial function 2024-12-01 11:54:56 +11:00
zhylmzr
2bd6fc9ebd fix DNS_RECORD.Data error align on windows i386
fixed: https://github.com/odin-lang/Odin/issues/4520
2024-12-01 11:54:56 +11:00
Laytan Laats
da4347f790 sys/info & odin report: rework macos version retrieval 2024-12-01 11:54:56 +11:00
Laytan Laats
5a201d588b add macos 15.1.1 to odin report and sys/info 2024-12-01 11:54:56 +11:00
o:tone
d15d152746 fix unmarshal unhandled error (#4515)
* fix unmarshal unhandled error
2024-12-01 11:54:55 +11:00
gingerBill
d85de2e54e Remove core:c/frontend 2024-12-01 11:54:54 +11:00
Colin Davidson
6c140b01ed oops 2024-12-01 11:54:54 +11:00
Colin Davidson
b66e756135 fix parsing issue around utc/localtime split 2024-12-01 11:54:54 +11:00
jakubtomsu
a119a6f33e Fix a bug in hxa decoder found by the new check 2024-12-01 11:54:54 +11:00
Dudejoe870
76d689a601 Fix typo in Quaternion dot product 2024-12-01 11:54:54 +11:00
Laytan Laats
460e2629bd sys/posix: add MAP_ANONYMOUS 2024-12-01 11:54:54 +11:00
Laytan Laats
468c0b573a add missing macos version 2024-12-01 11:54:54 +11:00
Laytan Laats
ed8aede369 os2: skip dir test when unsupported 2024-12-01 11:54:54 +11:00
Laytan Laats
d94ef8d27a sys/posix: fix dirfd on netbsd 2024-12-01 11:54:54 +11:00
Laytan Laats
ac2c9ac713 os2: fix file type detection in dir_windows 2024-12-01 11:54:54 +11:00
Laytan Laats
0c64129aad os2: fix leak in dir_windows 2024-12-01 11:54:54 +11:00
NicknEma
f8ba86e0a6 Fix integer type
Change int to i32 so it is the correct size
2024-12-01 11:54:54 +11:00
gingerBill
6963b0f3f2 Check for more errors in json.unmarshal 2024-12-01 11:54:54 +11:00
A1029384756
9e520c38db core:sys/linux - prefixing + moved IN_CLOSE/IN_MOVE to constants 2024-12-01 11:54:54 +11:00
A1029384756
59adcf6c46 core:sys/linux - flags, spacing, inotify_init 2024-12-01 11:54:54 +11:00
A1029384756
f6b0ea160b core:sys/linux - fixed vet errors 2024-12-01 11:54:54 +11:00
A1029384756
be66d4bd8b core:sys/linux - implemented inotify
core:sys/linux - added constants and spacing
2024-12-01 11:54:53 +11:00
gingerBill
5d38eb9d81 Remove relative types from json marshaller 2024-12-01 11:54:53 +11:00
Alex Overstreet
357d6212d0 Use tabs instead of spaces 2024-12-01 11:54:53 +11:00
Alex Overstreet
522f05445e Add STICKYKEYS, TOGGLEKEYS, and FILTERKEYS 2024-12-01 11:54:53 +11:00
Sebastian Pahnke
a0561860f9 Add NSApplication bindings for mainWindow and keyWindow 2024-12-01 11:54:53 +11:00
gingerBill
e72736a5a8 Remove #relative types from the compiler 2024-12-01 11:54:53 +11:00
p2jason
62d30daa00 Increase size of JS keyboard event key/code buffer size 2024-12-01 11:54:53 +11:00
Laytan Laats
38c79b203a reflect: add enum_value_has_name proc
Easy way to check if the current value has a defined name/member in the
enum type.
2024-12-01 11:54:53 +11:00
Bazzagibbs
25be3dfca0 Add core:slice.size to get the byte size of a slice's backing data 2024-12-01 11:54:53 +11:00
Jacob Pfeiffer
a8d603fd7d Correct zlib usage in doc 2024-12-01 11:54:53 +11:00
Doeke Wartena
cc1c97c6d0 Update scanner.odin
remove duplicated wording in comment
2024-12-01 11:54:53 +11:00
A1029384756
943b09a8b1 added unlinking section to posix socket binding documentation 2024-12-01 11:54:53 +11:00
gingerBill
11768c6217 Minor formatting change 2024-12-01 11:54:52 +11:00
Colin Davidson
514faa517e oops, missed a comma 2024-12-01 11:54:52 +11:00
Colin Davidson
3b4338b685 add new test, better fail-check, and non-transitioning tz fix 2024-12-01 11:54:52 +11:00
gingerBill
d5b6c25686 Fix #4406 os2 to not close the std file handles but rather just free the memory for the ^File data. 2024-12-01 11:54:52 +11:00
NicknEma
1b7a32f76c Mark procs as "contextless" in winerror.odin
So that they can be called from places like the windproc and stuff.
2024-12-01 11:54:52 +11:00
Jeroen van Rijn
1a13322cd7 Missing paren. 2024-12-01 11:54:52 +11:00
Jeroen van Rijn
c5d3fdca44 mem.is_aligned is in bytes, not log2 bytes
Fix formula and clarify comment
2024-12-01 11:54:52 +11:00
p2jason
ee84aa4ead Removed event hook callback from add_*_event_listener functions 2024-12-01 11:54:52 +11:00
p2jason
f993fcb82c Removed event queue from add_*_event_listener JS functions and added event hook callback 2024-12-01 11:54:52 +11:00
p2jason
aa08f661ca Changed boolean parameters to bit set in the add_*_event_listener functions 2024-12-01 11:54:52 +11:00
p2jason
0eac9f15bc Added parameters to the add_*_event_listener JS functions for stopping event behavior 2024-12-01 11:54:52 +11:00
Laytan Laats
9adc7f2bcf fix tabs 2024-12-01 11:54:52 +11:00
Laytan Laats
e6d324c5c4 testing: separate the posix import into target files
This is needed for the docs generator to generate all the docs for the
posix package, if it is imported like it was on Windows it would
generate docs for the Windows version of the package which has much less
symbols exposed.
2024-12-01 11:54:52 +11:00
Laytan Laats
c08408ea08 fix thread_unix for Darwin after pthread corrections in posix package
afed3ce removed the sys/unix package and moved over to sys/posix, it has
new bindings for the pthread APIs but should have been equivalent (not).

8fb7182 used `CANCEL_ENABLE :: 0`, `CANCEL_DISABLE :: 1`, `CANCEL_DEFERRED :: 0`, `CANCEL_ASYNCHRONOUS :: 1` for Darwin, while the
correct values are `1`, `0`, `2` and `0` respectively (same mistake was made for
FreeBSD in that commit).

What this meant is that the
`pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)` was not actually
successful, but because the error wasn't checked it was assumed it was.
It also meant `pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)` would
actually be setting `PTHREAD_CANCEL_DISABLE`.

The code in this PR restores the behaviour by now actually deliberately
setting `PTHREAD_CANCEL_DISABLE` and not setting
`PTHREAD_CANCEL_ASYNCHRONOUS` which was the previous behaviour that does
actually seem to work for some reason.

(I also fixed an issue in fmt where `x` would use uppercase if it was a
pointer.)
2024-12-01 11:54:52 +11:00
Laytan
78dc4d4907 fix test 2024-12-01 11:54:51 +11:00
Laytan
9f1c894f1f port pthread_mutex_t and pthread_cond_t from sys/unix cause miniaudio wants it 2024-12-01 11:54:51 +11:00