From 39db5d5b89dfd2086d73d171487ab9f185a0adf0 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 6 Nov 2026 23:23:28 +0100 Subject: Tokenize traits --- source/sys/posix/errno.elna | 8 ++++++++ source/sys/posix/stdio.elna | 6 ++++++ source/sys/posix/stdlib.elna | 3 +++ source/sys/posix/string.elna | 4 ++-- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 source/sys/posix/errno.elna (limited to 'source/sys/posix') diff --git a/source/sys/posix/errno.elna b/source/sys/posix/errno.elna new file mode 100644 index 0000000..7035ddf --- /dev/null +++ b/source/sys/posix/errno.elna @@ -0,0 +1,8 @@ +(* This Source Code Form is subject to the terms of the Mozilla Public License, + v. 2.0. If a copy of the MPL was not distributed with this file, You can + obtain one at https://mozilla.org/MPL/2.0/. *) +module + +import bits.errno* + +end. diff --git a/source/sys/posix/stdio.elna b/source/sys/posix/stdio.elna index dd7251d..39756a8 100644 --- a/source/sys/posix/stdio.elna +++ b/source/sys/posix/stdio.elna @@ -6,4 +6,10 @@ module proc printf*(format: ^const Word8) #{varargs} -> Int extern +proc puts*(s: ^const Word8) -> Int +extern + +proc putchar*(c: Int) -> Int +extern + end. diff --git a/source/sys/posix/stdlib.elna b/source/sys/posix/stdlib.elna index d4b381e..568e1da 100644 --- a/source/sys/posix/stdlib.elna +++ b/source/sys/posix/stdlib.elna @@ -18,4 +18,7 @@ extern proc strtoul*(str: ^const Word8; endptr: ^^Word8; base: Int) -> Word extern +proc strtoull*(str: ^const Word8; endptr: ^^Word8; base: Int) -> Word64 +extern + end. diff --git a/source/sys/posix/string.elna b/source/sys/posix/string.elna index ebe347c..561d975 100644 --- a/source/sys/posix/string.elna +++ b/source/sys/posix/string.elna @@ -3,13 +3,13 @@ obtain one at https://mozilla.org/MPL/2.0/. *) module -proc memset#[T]*(b: ^T; c: Int8; len: Word) -> ^T +proc memset#[T]*(b: ^T; c: Int; len: Word) -> ^T extern proc memcpy#[T]*(dst: ^T; src: ^const T; n: Word) -> ^T extern -proc memchr#[T]*(s: ^T; c: Int8; n: Word) -> ^T +proc memchr#[T]*(s: ^T; c: Int; n: Word) -> ^T extern end. -- cgit v1.2.3