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
2 changes: 1 addition & 1 deletion libc/src/__support/File/linux/lseekImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H
#define LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H

#include "include/llvm-libc-types/off_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/__support/error_or.h"
#include "src/errno/libc_errno.h"

#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
#include <unistd.h> // For off_t.

namespace LIBC_NAMESPACE {
namespace internal {
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/dup.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_DUP_H
#define LLVM_LIBC_SRC_UNISTD_DUP_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int dup(int fd);
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/dup2.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_DUP2_H
#define LLVM_LIBC_SRC_UNISTD_DUP2_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int dup2(int oldfd, int newfd);
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/dup3.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_DUP3_H
#define LLVM_LIBC_SRC_UNISTD_DUP3_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int dup3(int oldfd, int newfd, int flags);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/fork.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_FORK_H
#define LLVM_LIBC_SRC_UNISTD_FORK_H

#include <unistd.h>
#include "include/llvm-libc-types/pid_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/ftruncate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_FTRUNCATE_H
#define LLVM_LIBC_SRC_UNISTD_FTRUNCATE_H

#include <unistd.h>
#include "include/llvm-libc-types/off_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/getcwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETCWD_H
#define LLVM_LIBC_SRC_UNISTD_GETCWD_H

#include <unistd.h>
#include "include/llvm-libc-types/size_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/geteuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETEUID_H
#define LLVM_LIBC_SRC_UNISTD_GETEUID_H

#include <unistd.h>
#include "include/llvm-libc-types/uid_t.h"

namespace LIBC_NAMESPACE {

Expand Down
3 changes: 1 addition & 2 deletions libc/src/unistd/getopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETOPT_H
#define LLVM_LIBC_SRC_UNISTD_GETOPT_H

#include <stdio.h>
#include <unistd.h>
#include "include/llvm-libc-types/FILE.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/getpid.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETPID_H
#define LLVM_LIBC_SRC_UNISTD_GETPID_H

#include <unistd.h>
#include "include/llvm-libc-types/pid_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/getppid.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETPPID_H
#define LLVM_LIBC_SRC_UNISTD_GETPPID_H

#include <unistd.h>
#include "include/llvm-libc-types/pid_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/getuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_GETUID_H
#define LLVM_LIBC_SRC_UNISTD_GETUID_H

#include <unistd.h>
#include "include/llvm-libc-types/uid_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/isatty.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_ISATTY_H
#define LLVM_LIBC_SRC_UNISTD_ISATTY_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int isatty(int fd);
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_LINK_H
#define LLVM_LIBC_SRC_UNISTD_LINK_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int link(const char *, const char *);
Expand Down
4 changes: 2 additions & 2 deletions libc/src/unistd/linux/ftruncate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#include "src/unistd/ftruncate.h"

#include "include/llvm-libc-types/off_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"

#include "src/errno/libc_errno.h"

#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
#include <unistd.h>

namespace LIBC_NAMESPACE {

Expand Down
4 changes: 2 additions & 2 deletions libc/src/unistd/linux/lseek.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
//===----------------------------------------------------------------------===//

#include "src/unistd/lseek.h"
#include "src/errno/libc_errno.h"

#include "include/llvm-libc-types/off_t.h"
#include "src/__support/File/linux/lseekImpl.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/errno/libc_errno.h"

#include <sys/syscall.h> // For syscall numbers.
#include <unistd.h> // For off_t.

namespace LIBC_NAMESPACE {

Expand Down
4 changes: 3 additions & 1 deletion libc/src/unistd/linux/readlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

#include "src/unistd/readlink.h"

#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"

#include "src/errno/libc_errno.h"

#include <fcntl.h>
#include <sys/syscall.h> // For syscall numbers.

Expand Down
4 changes: 3 additions & 1 deletion libc/src/unistd/linux/readlinkat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

#include "src/unistd/readlinkat.h"

#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"

#include "src/errno/libc_errno.h"

#include <fcntl.h>
#include <sys/syscall.h> // For syscall numbers.

Expand Down
3 changes: 1 addition & 2 deletions libc/src/unistd/linux/sysconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

#include "src/unistd/sysconf.h"

#include "include/llvm-libc-macros/linux/unistd-macros.h"
#include "src/__support/common.h"

#include "src/errno/libc_errno.h"
#include "src/sys/auxv/getauxval.h"
#include <sys/auxv.h>
#include <unistd.h>

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/linux/truncate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#include "src/unistd/truncate.h"

#include "include/llvm-libc-types/off_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/errno/libc_errno.h"

#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
#include <unistd.h>

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/lseek.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_LSEEK_H
#define LLVM_LIBC_SRC_UNISTD_LSEEK_H

#include <unistd.h>
#include "include/llvm-libc-types/off_t.h"

namespace LIBC_NAMESPACE {

Expand Down
4 changes: 3 additions & 1 deletion libc/src/unistd/pread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#ifndef LLVM_LIBC_SRC_UNISTD_PREAD_H
#define LLVM_LIBC_SRC_UNISTD_PREAD_H

#include <unistd.h>
#include "include/llvm-libc-types/off_t.h"
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
4 changes: 3 additions & 1 deletion libc/src/unistd/pwrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#ifndef LLVM_LIBC_SRC_UNISTD_PWRITE_H
#define LLVM_LIBC_SRC_UNISTD_PWRITE_H

#include <unistd.h>
#include "include/llvm-libc-types/off_t.h"
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
3 changes: 2 additions & 1 deletion libc/src/unistd/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#ifndef LLVM_LIBC_SRC_UNISTD_READ_H
#define LLVM_LIBC_SRC_UNISTD_READ_H

#include <unistd.h>
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
3 changes: 2 additions & 1 deletion libc/src/unistd/readlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#ifndef LLVM_LIBC_SRC_UNISTD_READLINK_H
#define LLVM_LIBC_SRC_UNISTD_READLINK_H

#include <unistd.h>
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
3 changes: 2 additions & 1 deletion libc/src/unistd/readlinkat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#ifndef LLVM_LIBC_SRC_UNISTD_READLINKAT_H
#define LLVM_LIBC_SRC_UNISTD_READLINKAT_H

#include <unistd.h>
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/swab.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_SWAB_H
#define LLVM_LIBC_SRC_UNISTD_SWAB_H

#include <unistd.h> // For ssize_t
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/symlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_SYMLINK_H
#define LLVM_LIBC_SRC_UNISTD_SYMLINK_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int symlink(const char *, const char *);
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/symlinkat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_SYMLINKAT_H
#define LLVM_LIBC_SRC_UNISTD_SYMLINKAT_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

int symlinkat(const char *, int, const char *);
Expand Down
3 changes: 0 additions & 3 deletions libc/src/unistd/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_SYSCALL_H
#define LLVM_LIBC_SRC_UNISTD_SYSCALL_H

#include <stdarg.h>
#include <unistd.h>

namespace LIBC_NAMESPACE {

long __llvm_libc_syscall(long number, long arg1, long arg2, long arg3,
Expand Down
2 changes: 0 additions & 2 deletions libc/src/unistd/sysconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_UNISTD_SYSCONF_H
#define LLVM_LIBC_SRC_UNISTD_SYSCONF_H

#include <unistd.h>

namespace LIBC_NAMESPACE {

long sysconf(int name);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/truncate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_UNISTD_TRUNCATE_H
#define LLVM_LIBC_SRC_UNISTD_TRUNCATE_H

#include <unistd.h>
#include "include/llvm-libc-types/off_t.h"

namespace LIBC_NAMESPACE {

Expand Down
3 changes: 2 additions & 1 deletion libc/src/unistd/write.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#ifndef LLVM_LIBC_SRC_UNISTD_WRITE_H
#define LLVM_LIBC_SRC_UNISTD_WRITE_H

#include <unistd.h>
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"

namespace LIBC_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/sys/mman/linux/mincore_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "include/llvm-libc-macros/linux/unistd-macros.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/errno/libc_errno.h"
#include "src/sys/mman/madvise.h"
Expand All @@ -21,7 +22,6 @@

#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>

using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/sys/mman/linux/mlock_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "include/llvm-libc-macros/linux/unistd-macros.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/errno/libc_errno.h"
#include "src/sys/mman/madvise.h"
Expand All @@ -29,7 +30,6 @@
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <unistd.h>

using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;

Expand Down
1 change: 1 addition & 0 deletions libc/test/src/sys/mman/linux/msync_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "include/llvm-libc-macros/linux/unistd-macros.h"
#include "src/errno/libc_errno.h"
#include "src/sys/mman/mlock.h"
#include "src/sys/mman/mmap.h"
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/unistd/sysconf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "src/unistd/sysconf.h"
#include "test/UnitTest/Test.h"

#include <unistd.h>
#include "include/llvm-libc-macros/linux/unistd-macros.h"

TEST(LlvmLibcSysconfTest, PagesizeTest) {
long pagesize = LIBC_NAMESPACE::sysconf(_SC_PAGESIZE);
Expand Down
Loading