Commit Graph
116 Commits
Author SHA1 Message Date
gingerBill 93f71c2751 Merge pull request #7842 from bbodi/fix/llvm-objc-varargs
Fix/llvm objc varargs
2026-10-09 10:54:21 +01:00
gingerBill db97323760 Treat unknown sync objects as anything; mark libc, chan, pools, nbio, SDL and Linux futexes 2026-10-08 23:26:13 +01:00
BBandClaude Opus 5.5 baca00868b Pass va_list by value to libc's v* functions
C passes a va_list argument by value. The bindings took ^va_list, which
only matches x86-64 System V, where va_list is an array that decays to
a pointer. On Darwin, Windows and the other targets va_list is a
pointer or a struct, so vsnprintf and friends received the address of
the list instead of the list and printed or scanned garbage.

The foreign declarations now use the platform's form, and the public
procedures keep taking ^va_list so callers stay portable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 22:10:02 +02:00
gingerBill 56e7efb1d4 Adjust doc comments that misrender as CommonMark 2026-10-02 14:36:03 +01:00
jack gleeson ba3ddfadcc [core/c] Fix size of fastX int types per different archs/OSes 2026-09-21 11:40:51 -06:00
Ignacy Koper 22e23d354a removed Haiku from core:c/libc package
Signed-off-by: Ignacy Koper <ignacy423@gmail.com>
2026-04-28 19:27:24 +02:00
gingerBill 2fbc83d774 Fix typos 2026-04-28 15:07:56 +01:00
gingerBill f7c4031a61 Map the C va_* to the intrinsics 2026-04-28 15:02:42 +01:00
gingerBill 7b97530443 Add intrinsics.c_var_* 2026-04-28 15:00:53 +01:00
Jeroen van Rijn d767e1c513 Clarify long double comment 2026-03-07 14:57:39 +01:00
Jeroen van Rijn 6434bf4b65 Limit maximum exponent in parsing of float/integer literals 2026-03-07 12:38:04 +01:00
gingerBill e4fcebe4bf Empty -> Unsupported 2025-11-14 11:17:38 +00:00
Jeroen van Rijn eb0e99dac1 Fix #5852 2025-10-27 13:57:32 +01:00
Jeroen van Rijn 7a9ea3ee6d Further overhaul of package line comments. 2025-10-09 23:05:29 +02:00
Jeroen van Rijn 248b0fe9e1 More package lines 2025-10-09 16:11:33 +02:00
gingerBill 87716da363 Add package line docs to c and libc 2025-10-09 12:23:59 +01:00
Harold Brenes 24daa4427c Fix various foreign signatures 2025-09-29 19:58:14 -04:00
gingerBill bb4bc316a4 for in string16; Support string16 across core 2025-08-02 12:20:35 +01: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
Laytan Laats 34aa326d99 put FILE in core:c and use that in bindings to fix wasm 2025-01-27 19:00:04 +01:00
avanspector 0a985f5d02 Haiku: small fixes across core 2025-01-10 07:07:40 +01:00
avanspector 5d3a069e7a Haiku: more posix 2025-01-10 06:40:29 +01:00
avanspector 5376d2a20b fix haiku 2024-12-20 17:19:04 +01:00
gingerBill 12e7ff1e3c Remove core:c/frontend 2024-11-24 12:32:10 +00:00
Laytan Laats 1cebc025b0 sys/posix: impl rest of linux, impl some of Windows 2024-10-28 18:59:06 +01:00
IllusionMan1212 d52e0a892c fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint 2024-10-13 00:01:41 +02:00
Antonino Simone Di Stefano e9e7863033 Merge branch 'odin-lang:master' into master 2024-09-22 23:32:22 +02:00
gingerBill 1ae57d8d20 Fix more JS stuff 2024-09-22 13:32:28 +01:00
gingerBill 26d00925cc Clean-up libc usage 2024-09-22 13:20:45 +01:00
Antonino Simone Di Stefano b33f6ba1b0 Fix type in parameter of atomic_compare_exchange_weak_explicit
desited -> desired
2024-09-21 00:30:36 +02:00
Laytan Laats e0a2e52601 c/libc: fix time link name 2024-08-31 02:49:53 +02:00
Feoramund 981a2e1a00 Add missing io.Stream_Mode responses 2024-08-28 19:53:19 +02:00
Laytan Laats efe68c2e24 posix: add package 2024-08-14 01:44:35 +02:00
Feoramund 929cc48703 Merge Darwin signals into other UNIX-likes
They're all the same.
2024-06-28 19:03:43 -04:00
Feoramund ac9484206b Fix STDIN, STDOUT, STDERR handles for BSDs
Tested on FreeBSD 14.0 and NetBSD 10.0

OpenBSD is untested, but link names were sourced from:
https://github.com/openbsd/src/blob/master/include/stdio.h

According to this, OpenBSD shares the same layout as NetBSD.

FreeBSD has the same as Darwin in this regard.
2024-06-02 19:29:27 -04:00
Feoramund 95c2e020ff Share libc signal definitions with more platforms
I confirmed that these 3 platforms share the same signal definitions
from these sources.

Haiku: https://github.com/haiku/haiku/blob/master/headers/posix/signal.h
OpenBSD: https://github.com/openbsd/src/blob/master/sys/sys/signal.h
NetBSD: http://fxr.watson.org/fxr/source/sys/signal.h?v=NETBSD
2024-06-02 14:34:30 -04:00
Andreas T Jonsson 9a008d10f3 Merge branch 'master' into netbsd 2024-04-25 22:04:40 +02:00
Andreas T Jonsson dd95a8d11d More std lib fixes
Just selecting the same codepath as other BSD's for the most part.
2024-04-19 10:42:09 +02:00
Andreas T Jonsson 07fc07822d Added some libc bindings for NetBSD 2024-04-18 16:22:07 +02:00
Maurizio M. Gavioli a0cff82320 Fix the format of some doc.odin files of the core library which did not made into the documentation.
`c/frontend/tokenizer`:
   add proper "Example:" header to demo example code,
   removed empty lines.
`container/bit_array`:
   moved comment before package;
   aligned narrative lines to left margin;
   converted case lines into bulleted lines ("- ");
   converted individual examples to single-tab-indented preformatted text.
`dynlib`:
   removed "//+build ignore" line;
   added newline at EOF.
`image/netpmb`:
   converted indented lines of "Reading", "Wrting" and "Some syntax..." into bulleted lists;
   "Formats" indented lines kept as they are as the preformatted text seems relevant to keep the alignments;
   doubly indented lines kept as single-indented to keep them different (as the format does not allow for two-level bulleted lists);
   removed empy lines.
`os/os2`:	WIP, not modified
`sys/info`:
   removed "//+build ignore" line;
   converted tab-indented initial description into regular left-margin comment;
   moved uncommented sample code within the doc comment as an "Example:";
   moved simple- and double-tabbed separate comments with sample Windows and macOS outputs within the doc comment as bulleted headlines with preformatted output listings;
   removed now empty comments and blank lines after the package line.
`text/i18n`:
   removed "//+build ignore" line;
   moved the pacakge line at the end;
   de-indented the tab-indented introductory narrative;
   moved sample code comments into the doc comment as tab-indented code with a proper "Example:" heading;
   removed "```" MD attempts at code formatting.
`text/table`:
   unindented the comment lines of a descriptive kind;
   headlines of major subdivisions are marked as bold;
   kept code samples as tab-indented preformatted text (as there are several of them, the standard "Example:" and "Output:" headings cannot be used) removing the "```" MD attempts at code formatting;
   removed in-between blank lines.
2024-04-14 17:18:08 +02:00
gingerBill 53ce945034 Merge pull request #3230 from avanspector/haiku
Add Haiku OS support
2024-03-08 11:15:13 +00:00
Laytan Laats 50ded324e0 move va_list into core:c 2024-03-01 20:30:19 +01:00
avanspector 180902468f Revert "fix haiku"
This reverts commit 7290c69257.
2024-02-26 08:09:58 +01:00
avanspector 7290c69257 fix haiku 2024-02-26 08:07:17 +01:00
avanspector 6c16860be6 fix runtime and libc 2024-02-25 03:43:41 +01:00
avanspector c3746d9f56 fix core and libc 2024-02-25 03:32:35 +01:00
avanspector b03f17dd8d add haiku to base:runtime and core:c/libc 2024-02-25 02:59:45 +01:00
gingerBill 3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
Laytan Laats ce8801c37f c/libc: add to_stream proc
Adds the `to_stream` procedure to `core:c/libc` to improve usability of
the core collection when you have to use libc.
2024-01-08 19:20:06 +01:00
gingerBill 3baf8d92c3 Add assert to disallow -no-crt when importing core:c/libc 2023-11-23 01:20:19 +00:00