aboutsummaryrefslogtreecommitdiff
path: root/core/c
Commit message (Collapse)AuthorAgeFilesLines
* Fix `STDIN`, `STDOUT`, `STDERR` handles for BSDsFeoramund2024-06-021-6/+8
| | | | | | | | | | | 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.
* Share `libc` signal definitions with more platformsFeoramund2024-06-021-1/+1
| | | | | | | | | 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
* Merge branch 'master' into netbsdAndreas T Jonsson2024-04-251-29/+26
|\
| * Fix the format of some `doc.odin` files of the `core` library which did not ↵Maurizio M. Gavioli2024-04-141-29/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | More std lib fixesAndreas T Jonsson2024-04-191-1/+1
| | | | | | | | Just selecting the same codepath as other BSD's for the most part.
* | Added some libc bindings for NetBSDAndreas T Jonsson2024-04-183-3/+3
|/
* Merge pull request #3230 from avanspector/haikugingerBill2024-03-084-2/+54
|\ | | | | Add Haiku OS support
| * Revert "fix haiku"avanspector2024-02-261-30/+30
| | | | | | | | This reverts commit 7290c692577a2ce6c4f6046b0792ba8da3e61a93.
| * fix haikuavanspector2024-02-261-30/+30
| |
| * fix runtime and libcavanspector2024-02-251-0/+18
| |
| * fix core and libcavanspector2024-02-251-1/+1
| |
| * add haiku to base:runtime and core:c/libcavanspector2024-02-252-1/+35
| |
* | move `va_list` into `core:c`Laytan Laats2024-03-012-9/+13
|/
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-286-6/+6
|
* c/libc: add `to_stream` procLaytan Laats2024-01-081-0/+101
| | | | | Adds the `to_stream` procedure to `core:c/libc` to improve usability of the core collection when you have to use libc.
* Add assert to disallow `-no-crt` when importing `core:c/libc`gingerBill2023-11-231-0/+2
|
* Update stdio.odinreluctant-git-user2023-10-151-1/+1
| | | snprintf() prototype fix
* Require parentheses for `#align(N)`gingerBill2023-08-154-5/+5
|
* Disallow `for in` in favour of `for _ in`gingerBill2023-08-081-1/+1
|
* Use positional and named arguments within the core librarygingerBill2023-06-211-2/+2
|
* Minor fixesgingerBill2023-03-161-1/+1
|
* Fix `cnd_timedwait`gingerBill2023-01-161-1/+1
|
* fix core:c/libc.errno link_name for Linux and FreeBSDJulian Fondren2022-10-171-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the FreeBSD link matches Darwin, its EILSEQ still matches Linux. Confirmed with the following program: ```odin package main import "core:c/libc" main :: proc() { libc.printf("%d\n", libc.errno()^) // 0 _ = libc.fopen("nonexistent file", "r") libc.printf("%d\n", libc.errno()^) // 2 } ``` on Linux: Odin: dev-2022-10:075040ae OS: Manjaro Linux, Linux 5.10.147-1-MANJARO CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz RAM: 15953 MiB and FreeBSD: Odin: dev-2022-10:075040ae OS: FreeBSD: Unknown CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz RAM: 990 MiB FreeBSD uname -r: 13.0-RELEASE
* Add `system:legacy_stdio_definitions.lib` to `.odin` for WindowsgingerBill2022-10-021-1/+4
|
* Fix `libc.aligned_alloc` for Windows (thanks Microsoft(!))gingerBill2022-09-221-3/+16
|
* Fix `libc.aligned_alloc` on WindowsgingerBill2022-09-221-0/+13
|
* Correcting libc pow bindings134195962022-09-211-2/+2
| | | | | | Adding tests that libc pow(f) functions - have two arguments - behave as expected for simple inputs.
* fix some typoscui fliter2022-08-051-1/+1
| | | | Signed-off-by: cui fliter <imcusg@gmail.com>
* Merge branch 'master' of https://github.com/odin-lang/OdingingerBill2022-07-141-1/+1
|\
| * Rename strings.Builder procedures to be consistent with the rest of the core ↵gingerBill2022-07-111-1/+1
| | | | | | | | library
* | Fix `libc.putchar`gingerBill2022-07-141-1/+1
|/
* Add missing commasgingerBill2022-06-131-2/+2
|
* [path/filepath] Change join() to take a []string instead of varargsTetralux2022-05-211-1/+1
| | | | | | | | | This makes passing an allocator easier, as you no longer have to resort to named arguments: Before: `join(a, b, c)` became `join(elems={a, b, c}, allocator=ally)` After: `join({a, b, c})` becomes `join({a, b, c}, ally)`
* Fix is* proc in libc.Jeroen van Rijn2022-05-201-10/+10
|
* `intrinsics.atomic_type_is_lock_free`gingerBill2022-04-021-1/+1
|
* Change `intrinsics.Atomic_Memory_Order` fields to use `Ada_Case` rather than ↵gingerBill2022-03-311-75/+75
| | | | `snake_case`
* Add checks for memory ordering on fencesgingerBill2022-03-311-6/+6
|
* Update core to use new atomic intrinsicsgingerBill2022-03-311-145/+110
|
* Merge pull request #1614 from semarie/openbsd-fpos_tgingerBill2022-03-141-1/+1
|\ | | | | use distinct type for fpos_t on OpenBSD
| * use distinct type for fpos_t on OpenBSDSébastien Marie2022-03-121-1/+1
| |
* | freebsd_amd64 supportSébastien Marie2022-03-132-6/+33
|/
* initial OpenBSD supportSébastien Marie2022-02-254-2/+50
|
* Merge branch 'master' into odin-global-constants-as-enumsgingerBill2022-02-151-1/+1
|\
| * Fix fread definitionDale Weiler2022-01-231-1/+1
| |
* | Convert `ODIN_OS` and `ODIN_ARCH` to use enums rather than use stringsgingerBill2022-01-2015-51/+51
|/
* Rename architecture `386` to `i386`gingerBill2022-01-151-1/+1
|
* add schar to core:c and core:c/libcTyler Erickson2022-01-042-0/+4
|
* Fix minor typo in c/frontend/preprocessgingerBill2022-01-041-1/+1
|
* Add support for darwin to `core:c/libc`gingerBill2021-11-1614-8/+116
|
* Deprecate `strings.write_quoted_*` in favour of `io.write_quoted_*`; make ↵gingerBill2021-09-291-3/+3
| | | | `reflect.write_type` a little more robust with `io.Error` handling