Commit Graph

1153 Commits

Author SHA1 Message Date
Harold Brenes bab4ce11fc Rename iOS subtarget to iPhone for consistency.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes 219b0fe535 Replace system:System.framework imports with system:System
This makes the linker work for both macOS and iOS targets
2025-07-13 15:45:21 -04:00
Jeroen van Rijn e89abd006f Fix #5452 2025-07-11 15:29:27 +02:00
Jamie Dennis ee9b4f767b Fix incorrect type for FONTENUMPROCW 2025-07-01 15:31:22 +12:00
Sunagatov Denis e21cde0cf7 sys/linux: Unify IPC_Flags and IPC_Mode bitsets
In #5399 it was noticed, that IPC_Mode isn't being used within SystemV
IPC procedures, even though it was designed this way, which lead to a
weird API where in order to call SystemV IPC procedures multiple
transmutes and a bitwise-OR are needed.

This unifies IPC_Mode and IPC_Flags bitsets, making it possible to call
the SystemV IPC procedures without extra casts, and rearranges the flags
in a way that hopefully makes it easier to see when they are not
colliding and should not be mixed. The explanation, explaining this
arrangement of the enum was added.

The IPC_Perm structure is modified, so that the flags can be re-used
between the calls. It's probably not as good as keeping them separate,
but should work... hopefully.

Kept the "old" style of documentation for consistency.

Signed-off-by: Sunagatov Denis <thebumboni@gmail.com>
2025-06-24 20:30:50 +11:00
RaphGL e374ace10d added IS_SUPPORTED to core:sys/posix 2025-06-21 12:12:13 -01:00
Raph a7e89e1324 Merge branch 'master' into tiocgwinsz_time 2025-06-20 16:50:00 -01:00
RaphGL 0b5be6ad6a added TIOCGWINSZ to darwin, linux and freebsd 2025-06-20 16:45:05 -01:00
Feoramund b82753227d sys/posix: Correct reference to core:text/regex 2025-06-20 10:46:40 -04:00
Jeroen van Rijn 9c810e8340 Fix #5366 2025-06-19 22:46:51 +02:00
David Holland 0a45d4de0c Fix WAVEFORMATEX struct size (#5356)
* fix WAVEFORMATEX struct size
* fix size test for WAVEFORMATEX
* pack WAVEFORMATEXTENSIBLE
2025-06-18 12:25:09 +02:00
PePerRoNii a0e2931dc2 Added GetThreadDescription kernal32.odin 2025-06-17 15:36:48 +07:00
Jeroen van Rijn 246deda2c5 Remove unneeded ; for essence 2025-06-16 23:03:07 +02:00
Jeroen van Rijn eef07431ef Factor out buffered utf helper. 2025-06-16 20:12:27 +02:00
Laytan Laats 144daf6fff add macOS Tahoe to odin report and core:sys/info 2025-06-14 00:27:37 +02:00
gingerBill 4aec582a05 Add system:dl to foreign import for dlfcn.odin 2025-06-11 15:27:00 +01:00
Feoramund 0747032e4a Use idiomatic rawptr(nil) 2025-06-08 17:48:06 -04:00
Jeroen van Rijn d2d187eaaa Work around untyped nil 2025-06-08 22:53:52 +02:00
Tohei Ichikawa 7662e7d843 Removed obsolete tz param from gettimeofday 2025-06-08 16:07:11 -04:00
Tohei Ichikawa 876f1c02b7 Added missing parameter to gettimeofday 2025-06-08 12:47:50 -04:00
Jeroen van Rijn f1ce9f98d8 Re-add htonl and htons for those porting from C. 2025-06-06 13:13:34 +02:00
Jeroen van Rijn 4b36306674 Deprecate old @(deprecated) things. 2025-06-06 10:42:34 +02:00
Jeroen van Rijn ae5c92ac38 Enable odin check examples/all for JS. 2025-06-04 11:08:25 +02:00
Ben Ryan cd417b0d1f Add windows bindings to support overlapped IO 2025-06-04 11:34:31 +10:00
gingerBill cd1f66e85c Merge pull request #5246 from RichardFevrier/master
Posix: Signal: add SIGWINCH support
2025-06-02 11:50:49 +01:00
Richard Février f27f9bcd33 Posix: Signal: add SIGWINCH support 2025-05-31 10:01:59 +02:00
Alexander Lunsford edba218a7c Simplified function call to loadCstringDirect 2025-05-30 20:02:08 -05:00
Alexander Lunsford 9d223e178b Fix odin.js loadCstring to use pointer address correctly. 2025-05-30 19:50:34 -05:00
Zach Clark 78d83288a0 Add missing SEL _cmd argument to objc class_addMethod IMPs
When trying to grab the window pointer off the notification in a
windowDidBecomeKey implementation, I kept getting segfaults calling
notification->object(). The second argument of these needs to be a SEL.

https://developer.apple.com/documentation/objectivec/class_addmethod(_:_:_:_:)?language=objc#Discussion

I imagine existing code is getting by by setting the window information
in the delegate's context userdata, which works fine when you only have
one window as you can avoid needing to call notification->object(),
until you want one delegate assigned to two windows, hard to work around.
2025-05-27 17:04:19 -07:00
Vincent Billet d98253564b MAKEFOURCC: changed BYTE to byte 2025-05-26 22:31:21 +02:00
Laytan Laats eac58fc640 sys/info: populate cpu.physical_cores and cpu.logical_cores on Darwin 2025-05-26 20:41:18 +02:00
Vincent Billet 9b7bb9290e HRESULT_FROM_WIN32 correction 2025-05-26 08:52:46 +02:00
Vincent Billet bb274ab512 Merge branch 'odin-lang:master' into badaxis/Windows-Audio&Winmm 2025-05-26 08:16:45 +02:00
Jeroen van Rijn 655fab7227 Add core/hyperthread count for Windows and Linux (#5216)
Add core/hyperthread count to `core:sys/info` for Windows and Linux.
TODO: Linux RISCV, Linux ARM, Darwin, and the BSDs.
2025-05-25 19:43:10 +02:00
Vincent Billet 1ed05c2498 Retracted some winmm changes 2025-05-22 12:15:16 +02:00
Vincent Billet 240d45201d Reverted CoCreateInstance formatting 2025-05-22 09:14:33 +02:00
Vincent Billet b03cdd22d5 COM & Audio useful bindings 2025-05-21 09:48:41 +02:00
Krzesimir Nowak 3519cecb7c Formatting fixes 2025-05-18 15:25:17 +02:00
Krzesimir Nowak 306d3a16c4 sys/linux: Improve documentation for Dirent and related procedures 2025-05-17 20:05:51 +02:00
Jeroen van Rijn d6210ae76f Fix -vet complaints in core:sys/darwin/Foundation 2025-05-17 16:36:10 +02:00
gingerBill 5454e120fe Add NSMenuItem.odin 2025-05-17 13:27:54 +01:00
gingerBill d77124feae Add Objective-C helper for creating subclasses 2025-05-17 11:36:24 +01:00
Jeroen van Rijn be24feb862 Move things to constants.odin 2025-05-12 17:13:59 +02:00
Jeroen van Rijn dec3d6959d Update linux.Map_Flags_Bits
Fixes #5151

- Removes `SHARED_VALIDATE` from the enum and turns it into `Map_Shared_Validate :: Map_Flags{.SHARED, .PRIVATE}` so it has the proper value of 0x03.
- Adds `DROPPABLE`.
- Adds constants `MAP_HUGE_SHIFT` and `MAP_HUGE_MASK`.
- Adds the huge page precomputed constants from `mman.h`, defined as the log2 of the size shifted left by `MAP_HUGE_SHIFT`:
	Map_Huge_16KB
	Map_Huge_64KB
	Map_Huge_512KB
	Map_Huge_1MB
	Map_Huge_2MB
	Map_Huge_8MB
	Map_Huge_16MB
	Map_Huge_32MB
	Map_Huge_256MB
	Map_Huge_512MB
	Map_Huge_1GB
	Map_Huge_2GB
	Map_Huge_16GB
2025-05-12 16:45:51 +02:00
Laytan Laats cacb9f9f54 os2: better copy_directory, and add native copy_file and copy_directory variants on MacOS 2025-05-08 19:32:30 +02:00
gingerBill edbe7aa06e Merge pull request #5091 from Badaxis/badaxis/windows-scancodes
Adding windows keyboard scan codes
2025-05-08 16:33:14 +01:00
Jeroen van Rijn 8032db3484 Fix CreateDibSection binding 2025-05-05 23:23:39 +02:00
omark96 1b8a65c327 win/sys: Add GetWindowThreadProcessId 2025-05-03 23:44:55 +02:00
Vincent Billet d24bac8a36 Adding windows keyboard scan codes 2025-04-29 18:00:41 +02:00
Harold Brenes 040d8b1d48 Fix 2 selectors in NSDictionary 2025-04-17 15:22:10 -04:00