brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · a4c8e3c Raw
58 lines · c
1//===-- Definition of macros from unistd.h --------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H10#define LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H11 12// Values for mode argument to the access(...) function.13#define F_OK 014#define X_OK 115#define W_OK 216#define R_OK 417 18#define _SC_PAGESIZE 119#define _SC_PAGE_SIZE _SC_PAGESIZE20 21#define _PC_FILESIZEBITS 022#define _PC_LINK_MAX 123#define _PC_MAX_CANON 224#define _PC_MAX_INPUT 325#define _PC_NAME_MAX 426#define _PC_PATH_MAX 527#define _PC_PIPE_BUF 628#define _PC_2_SYMLINKS 729#define _PC_ALLOC_SIZE_MIN 830#define _PC_REC_INCR_XFER_SIZE 931#define _PC_REC_MAX_XFER_SIZE 1032#define _PC_REC_MIN_XFER_SIZE 1133#define _PC_REC_XFER_ALIGN 1234#define _PC_SYMLINK_MAX 1335#define _PC_CHOWN_RESTRICTED 1436#define _PC_NO_TRUNC 1537#define _PC_VDISABLE 1638#define _PC_ASYNC_IO 1739#define _PC_PRIO_IO 1840#define _PC_SYNC_IO 1941 42// TODO: Move these limit macros to a separate file43#define _POSIX_CHOWN_RESTRICTED 144#define _POSIX_PIPE_BUF 51245#define _POSIX_NO_TRUNC 146#define _POSIX_VDISABLE '\0'47 48// Macro to set up the call to the __llvm_libc_syscall function49// This is to prevent the call from having fewer than 6 arguments, since six50// arguments are always passed to the syscall. Unnecessary arguments are51// ignored.52#define __syscall_helper(sysno, arg1, arg2, arg3, arg4, arg5, arg6, ...)       \53  __llvm_libc_syscall((long)(sysno), (long)(arg1), (long)(arg2), (long)(arg3), \54                      (long)(arg4), (long)(arg5), (long)(arg6))55#define syscall(...) __syscall_helper(__VA_ARGS__, 0, 1, 2, 3, 4, 5, 6)56 57#endif // LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H58