Path: blob/main/contrib/llvm-project/libc/include/llvm-libc-macros/linux/unistd-macros.h
213799 views
//===-- Definition of macros from unistd.h --------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H9#define LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H1011// Values for mode argument to the access(...) function.12#define F_OK 013#define X_OK 114#define W_OK 215#define R_OK 41617#define _SC_PAGESIZE 118#define _SC_PAGE_SIZE _SC_PAGESIZE1920#define _PC_FILESIZEBITS 021#define _PC_LINK_MAX 122#define _PC_MAX_CANON 223#define _PC_MAX_INPUT 324#define _PC_NAME_MAX 425#define _PC_PATH_MAX 526#define _PC_PIPE_BUF 627#define _PC_2_SYMLINKS 728#define _PC_ALLOC_SIZE_MIN 829#define _PC_REC_INCR_XFER_SIZE 930#define _PC_REC_MAX_XFER_SIZE 1031#define _PC_REC_MIN_XFER_SIZE 1132#define _PC_REC_XFER_ALIGN 1233#define _PC_SYMLINK_MAX 1334#define _PC_CHOWN_RESTRICTED 1435#define _PC_NO_TRUNC 1536#define _PC_VDISABLE 1637#define _PC_ASYNC_IO 1738#define _PC_PRIO_IO 1839#define _PC_SYNC_IO 194041// TODO: Move these limit macros to a separate file42#define _POSIX_CHOWN_RESTRICTED 143#define _POSIX_PIPE_BUF 51244#define _POSIX_NO_TRUNC 145#define _POSIX_VDISABLE '\0'4647// Macro to set up the call to the __llvm_libc_syscall function48// This is to prevent the call from having fewer than 6 arguments, since six49// arguments are always passed to the syscall. Unnecessary arguments are50// ignored.51#define __syscall_helper(sysno, arg1, arg2, arg3, arg4, arg5, arg6, ...) \52__llvm_libc_syscall((long)(sysno), (long)(arg1), (long)(arg2), (long)(arg3), \53(long)(arg4), (long)(arg5), (long)(arg6))54#define syscall(...) __syscall_helper(__VA_ARGS__, 0, 1, 2, 3, 4, 5, 6)5556#endif // LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H575859