Path: blob/main/contrib/llvm-project/libc/src/__support/OSUtil/fcntl.h
213799 views
//===-- Implementation header of internal fcntl function ------------------===//1// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.2// See https://llvm.org/LICENSE.txt for license information.3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception4//5//===----------------------------------------------------------------------===//67#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_FCNTL_H8#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_FCNTL_H910#include "hdr/types/mode_t.h"11#include "src/__support/error_or.h"12#include "src/__support/macros/config.h"1314namespace LIBC_NAMESPACE_DECL {15namespace internal {1617ErrorOr<int> fcntl(int fd, int cmd, void *arg = nullptr);1819ErrorOr<int> open(const char *path, int flags, mode_t mode_flags = 0);2021ErrorOr<int> close(int fd);2223} // namespace internal24} // namespace LIBC_NAMESPACE_DECL2526#endif // LLVM_LIBC_SRC___SUPPORT_OSUTIL_FCNTL_H272829