From 7ab6e1021611cc6913ee4ab5faf1b31f928a65e9 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 13 Nov 2026 12:01:17 +0100 Subject: Create parser stubs --- source/sys/posix/stdlib.elna | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/sys/posix/stdlib.elna') diff --git a/source/sys/posix/stdlib.elna b/source/sys/posix/stdlib.elna index 497e87d..272400a 100644 --- a/source/sys/posix/stdlib.elna +++ b/source/sys/posix/stdlib.elna @@ -3,6 +3,8 @@ obtain one at https://mozilla.org/MPL/2.0/. *) module +import sys.ffi + proc malloc#[T]*(size: Word) -> ^T extern @@ -12,19 +14,22 @@ extern proc realloc#[T]*(ptr: ^T; size: Word) -> ^T extern -proc strtol*(str: ^const Word8; endptr: ^^Word8; base: Int) -> Int +proc strtol*(str: ^const CChar; endptr: ^^CChar; base: CInt) -> CLong +extern + +proc strtoll*(str: ^const CChar; endptr: ^^CChar; base: CInt) -> CLongLong extern -proc strtoul*(str: ^const Word8; endptr: ^^Word8; base: Int) -> Word +proc strtoul*(str: ^const CChar; endptr: ^^CChar; base: CInt) -> CULong extern -proc strtoull*(str: ^const Word8; endptr: ^^Word8; base: Int) -> Word64 +proc strtoull*(str: ^const CChar; endptr: ^^CChar; base: CInt) -> CULongLong extern -proc strtof*(nptr: ^const Word8; endptr: ^^Word8) -> Single +proc strtof*(nptr: ^const CChar; endptr: ^^CChar) -> Single extern -proc strtod*(nptr: ^const Word8; endptr: ^^Word8) -> Double +proc strtod*(nptr: ^const CChar; endptr: ^^CChar) -> Double extern end. -- cgit v1.2.3