Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions abis/cryptix/access.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _ABIBITS_ACCESS_H
#define _ABIBITS_ACCESS_H

#define F_OK 0
#define X_OK 1
#define W_OK 2
#define R_OK 4

#endif // _ABIBITS_ACCESS_H
13 changes: 13 additions & 0 deletions abis/cryptix/auxv.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef _ABIBITS_AUXV_H
#define _ABIBITS_AUXV_H

#define AT_PLATFORM 15
#define AT_HWCAP 16
#define AT_CLKTCK 17
#define AT_FPUCW 18
#define AT_SECURE 23
#define AT_RANDOM 25
#define AT_EXECFN 31
#define AT_SYSINFO_EHDR 33

#endif // _ABIBITS_AUXV_H
8 changes: 8 additions & 0 deletions abis/cryptix/blkcnt_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef _ABIBITS_BLKCNT_T_H
#define _ABIBITS_BLKCNT_T_H

#include <bits/types.h>

typedef __mlibc_int64 blkcnt_t;

#endif // _ABIBITS_BLKCNT_T_H
8 changes: 8 additions & 0 deletions abis/cryptix/blksize_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#ifndef _ABIBITS_BLKSIZE_T_H
#define _ABIBITS_BLKSIZE_T_H

typedef long blksize_t;

#endif // _ABIBITS_BLKSIZE_T_H

7 changes: 7 additions & 0 deletions abis/cryptix/clockid_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef _ABIBITS_CLOCKID_T_H
#define _ABIBITS_CLOCKID_T_H

typedef int clockid_t;

#endif /* _ABIBITS_CLOCKID_T_H */

10 changes: 10 additions & 0 deletions abis/cryptix/dev_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#ifndef _ABIBITS_DEV_T_H
#define _ABIBITS_DEV_T_H

#include <bits/types.h>

typedef __mlibc_uint64 dev_t;

#endif // _ABIBITS_DEV_T_H

6 changes: 6 additions & 0 deletions abis/cryptix/epoll.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _ABIBITS_EPOLL_H
#define _ABIBITS_EPOLL_H

#define EPOLL_CLOEXEC 02000000 // Same as __MLIBC_O_CLOEXEC

#endif // _ABIBITS_EPOLL_H
143 changes: 143 additions & 0 deletions abis/cryptix/errno.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#ifndef _ABIBITS_ERRNO_H
#define _ABIBITS_ERRNO_H

#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
#define EDEADLK 35
#define ENAMETOOLONG 36
#define ENOLCK 37
#define ENOSYS 38
#define ENOTEMPTY 39
#define ELOOP 40
#define EWOULDBLOCK EAGAIN
#define ENOMSG 42
#define EIDRM 43
#define ECHRNG 44
#define EL2NSYNC 45
#define EL3HLT 46
#define EL3RST 47
#define ELNRNG 48
#define EUNATCH 49
#define ENOCSI 50
#define EL2HLT 51
#define EBADE 52
#define EBADR 53
#define EXFULL 54
#define ENOANO 55
#define EBADRQC 56
#define EBADSLT 57
#define EDEADLOCK EDEADLK
#define EBFONT 59
#define ENOSTR 60
#define ENODATA 61
#define ETIME 62
#define ENOSR 63
#define ENONET 64
#define ENOPKG 65
#define EREMOTE 66
#define ENOLINK 67
#define EADV 68
#define ESRMNT 69
#define ECOMM 70
#define EPROTO 71
#define EMULTIHOP 72
#define EDOTDOT 73
#define EBADMSG 74
#define EOVERFLOW 75
#define ENOTUNIQ 76
#define EBADFD 77
#define EREMCHG 78
#define ELIBACC 79
#define ELIBBAD 80
#define ELIBSCN 81
#define ELIBMAX 82
#define ELIBEXEC 83
#define EILSEQ 84
#define ERESTART 85
#define ESTRPIPE 86
#define EUSERS 87
#define ENOTSOCK 88
#define EDESTADDRREQ 89
#define EMSGSIZE 90
#define EPROTOTYPE 91
#define ENOPROTOOPT 92
#define EPROTONOSUPPORT 93
#define ESOCKTNOSUPPORT 94
#define EOPNOTSUPP 95
#define ENOTSUP EOPNOTSUPP
#define EPFNOSUPPORT 96
#define EAFNOSUPPORT 97
#define EADDRINUSE 98
#define EADDRNOTAVAIL 99
#define ENETDOWN 100
#define ENETUNREACH 101
#define ENETRESET 102
#define ECONNABORTED 103
#define ECONNRESET 104
#define ENOBUFS 105
#define EISCONN 106
#define ENOTCONN 107
#define ESHUTDOWN 108
#define ETOOMANYREFS 109
#define ETIMEDOUT 110
#define ECONNREFUSED 111
#define EHOSTDOWN 112
#define EHOSTUNREACH 113
#define EALREADY 114
#define EINPROGRESS 115
#define ESTALE 116
#define EUCLEAN 117
#define ENOTNAM 118
#define ENAVAIL 119
#define EISNAM 120
#define EREMOTEIO 121
#define EDQUOT 122
#define ENOMEDIUM 123
#define EMEDIUMTYPE 124
#define ECANCELED 125
#define ENOKEY 126
#define EKEYEXPIRED 127
#define EKEYREVOKED 128
#define EKEYREJECTED 129
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
#define EHWPOISON 133


// This is mlibc-specific.
#define EIEIO 4095

#endif // _ABIBITS_ERRNO_H
89 changes: 89 additions & 0 deletions abis/cryptix/fcntl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#ifndef _ABIBITS_FCNTL_H
#define _ABIBITS_FCNTL_H

#include <abi-bits/pid_t.h>

#define O_PATH 010000000

#define O_ACCMODE (03 | O_PATH)
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02

#define O_CREAT 0100
#define O_EXCL 0200
#define O_NOCTTY 0400
#define O_TRUNC 01000
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_DSYNC 010000
#define O_ASYNC 020000
#define O_DIRECT 040000
#define O_DIRECTORY 0200000
#define O_NOFOLLOW 0400000
#define O_CLOEXEC 02000000
#define O_SYNC 04010000
#define O_RSYNC 04010000
#define O_LARGEFILE 0100000
#define O_NOATIME 01000000
#define O_TMPFILE 020000000

#define O_EXEC O_PATH
#define O_SEARCH O_PATH

#define F_DUPFD 0
#define F_GETFD 1
#define F_SETFD 2
#define F_GETFL 3
#define F_SETFL 4

#define F_SETOWN 8
#define F_GETOWN 9
#define F_SETSIG 10
#define F_GETSIG 11

#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7

#define F_SETOWN_EX 15
#define F_GETOWN_EX 16

#define F_GETOWNER_UIDS 17

#define F_DUPFD_CLOEXEC 1030
#define F_ADD_SEALS 1033
#define F_GET_SEALS 1034

#define F_SEAL_SEAL 0x0001
#define F_SEAL_SHRINK 0x0002
#define F_SEAL_GROW 0x0004
#define F_SEAL_WRITE 0x0008

#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2

#define FD_CLOEXEC 1

#define AT_FDCWD -100
#define AT_SYMLINK_NOFOLLOW 0x100
#define AT_REMOVEDIR 0x200
#define AT_SYMLINK_FOLLOW 0x400
#define AT_EACCESS 0x200
#define AT_EMPTY_PATH 0x1000


struct f_owner_ex {
int type;
pid_t pid;
};

#define POSIX_FADV_NORMAL 0
#define POSIX_FADV_RANDOM 1
#define POSIX_FADV_SEQUENTIAL 2
#define POSIX_FADV_WILLNEED 3
#define POSIX_FADV_DONTNEED 4
#define POSIX_FADV_NOREUSE 5

#endif // _ABIBITS_FCNTL_H
8 changes: 8 additions & 0 deletions abis/cryptix/fsblkcnt_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef _ABIBITS_FSBLKCNT_T_H
#define _ABIBITS_FSBLKCNT_T_H

#include <bits/types.h>

typedef __mlibc_uint64 fsblkcnt_t;

#endif /* _ABIBITS_FSBLKCNT_T_H */
8 changes: 8 additions & 0 deletions abis/cryptix/fsfilcnt_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef _ABIBITS_FSFILCNT_T_H
#define _ABIBITS_FSFILCNT_T_H

#include <bits/types.h>

typedef __mlibc_uint64 fsfilcnt_t;

#endif /* _ABIBITS_FSFILCNT_T_H */
8 changes: 8 additions & 0 deletions abis/cryptix/gid_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#ifndef _ABIBITS_GID_T_H
#define _ABIBITS_GID_T_H

typedef unsigned int gid_t;

#endif // _ABIBITS_GID_T_H

Loading