diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-11-06 23:23:28 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-11-06 23:23:28 +0100 |
| commit | 39db5d5b89dfd2086d73d171487ab9f185a0adf0 (patch) | |
| tree | 4b88c9ee55514c4bea293ae1ce32c9e74b0d2b03 /arch | |
| parent | 48a51628b841a9b69db846326dcaa67239a8559f (diff) | |
| download | elna-39db5d5b89dfd2086d73d171487ab9f185a0adf0.tar.gz | |
Tokenize traits
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/darwin/arm64/sys/ffi.elna | 17 | ||||
| -rw-r--r-- | arch/linux/x64/sys/ffi.elna | 17 | ||||
| -rw-r--r-- | arch/platform/darwin/bits/errno.elna | 47 | ||||
| -rw-r--r-- | arch/platform/linux/bits/errno.elna | 47 |
4 files changed, 128 insertions, 0 deletions
diff --git a/arch/darwin/arm64/sys/ffi.elna b/arch/darwin/arm64/sys/ffi.elna new file mode 100644 index 0000000..5f0d8c2 --- /dev/null +++ b/arch/darwin/arm64/sys/ffi.elna @@ -0,0 +1,17 @@ +(* 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 + +type + CChar* = Word8 + CShort* = Int16 + CUShort* = Word16 + CInt* = Int32 + CUInt* = Word32 + CLong* = Int64 + CULong* = Word64 + CLongLong* = Int64 + CULongLong* = Word64 + +end. diff --git a/arch/linux/x64/sys/ffi.elna b/arch/linux/x64/sys/ffi.elna new file mode 100644 index 0000000..5f0d8c2 --- /dev/null +++ b/arch/linux/x64/sys/ffi.elna @@ -0,0 +1,17 @@ +(* 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 + +type + CChar* = Word8 + CShort* = Int16 + CUShort* = Word16 + CInt* = Int32 + CUInt* = Word32 + CLong* = Int64 + CULong* = Word64 + CLongLong* = Int64 + CULongLong* = Word64 + +end. diff --git a/arch/platform/darwin/bits/errno.elna b/arch/platform/darwin/bits/errno.elna new file mode 100644 index 0000000..547e99a --- /dev/null +++ b/arch/platform/darwin/bits/errno.elna @@ -0,0 +1,47 @@ +(* 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 + +const + EPERM* = 1i32 + ENOENT* = 2i32 + ESRCH* = 3i32 + EINTR* = 4i32 + EIO* = 5i32 + ENXIO* = 6i32 + E2BIG* = 7i32 + ENOEXEC* = 8i32 + EBADF* = 9i32 + ECHILD* = 10i32 + ENOMEM* = 12i32 + EACCES* = 13i32 + EFAULT* = 14i32 + EBUSY* = 16i32 + EEXIST* = 17i32 + EXDEV* = 18i32 + ENODEV* = 19i32 + ENOTDIR* = 20i32 + EISDIR* = 21i32 + EINVAL* = 22i32 + ENFILE* = 23i32 + EMFILE* = 24i32 + ENOTTY* = 25i32 + ETXTBSY* = 26i32 + EFBIG* = 27i32 + ENOSPC* = 28i32 + ESPIPE* = 29i32 + EROFS* = 30i32 + EMLINK* = 31i32 + EPIPE* = 32i32 + EDOM* = 33i32 + ERANGE* = 34i32 + EAGAIN* = 35i32 + +proc __error() -> ^Int32 +extern + +proc errno*() -> ^Int32 +return __error() + +end. diff --git a/arch/platform/linux/bits/errno.elna b/arch/platform/linux/bits/errno.elna new file mode 100644 index 0000000..b3b8835 --- /dev/null +++ b/arch/platform/linux/bits/errno.elna @@ -0,0 +1,47 @@ +(* 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 + +const + EPERM* = 1i32 + ENOENT* = 2i32 + ESRCH* = 3i32 + EINTR* = 4i32 + EIO* = 5i32 + ENXIO* = 6i32 + E2BIG* = 7i32 + ENOEXEC* = 8i32 + EBADF* = 9i32 + ECHILD* = 10i32 + EAGAIN* = 11i32 + ENOMEM* = 12i32 + EACCES* = 13i32 + EFAULT* = 14i32 + EBUSY* = 16i32 + EEXIST* = 17i32 + EXDEV* = 18i32 + ENODEV* = 19i32 + ENOTDIR* = 20i32 + EISDIR* = 21i32 + EINVAL* = 22i32 + ENFILE* = 23i32 + EMFILE* = 24i32 + ENOTTY* = 25i32 + ETXTBSY* = 26i32 + EFBIG* = 27i32 + ENOSPC* = 28i32 + ESPIPE* = 29i32 + EROFS* = 30i32 + EMLINK* = 31i32 + EPIPE* = 32i32 + EDOM* = 33i32 + ERANGE* = 34i32 + +proc __errno_location() -> ^Int32 +extern + +proc errno*() -> ^Int32 +return __errno_location() + +end. |
