#ifndef __LLVM_LIBC_MACROS_FCNTL_MACROS_H
#define __LLVM_LIBC_MACROS_FCNTL_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/fcntl-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SCHED_MACROS_H
#define __LLVM_LIBC_MACROS_SCHED_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sched-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_IOCTL_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_IOCTL_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-ioctl-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_MMAN_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_MMAN_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-mman-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_RANDOM_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_RANDOM_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-random-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_RESOURCE_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_RESOURCE_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-resource-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_SOCKET_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_SOCKET_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-socket-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_STAT_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_STAT_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-stat-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_SYS_TIME_MACROS_H
#define __LLVM_LIBC_MACROS_SYS_TIME_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/sys-time-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_TIME_MACROS_H
#define __LLVM_LIBC_MACROS_TIME_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/time-macros.h"
#endif
#ifndef __LLVM_LIBC_MACROS_UNISTD_MACROS_H
#define __LLVM_LIBC_MACROS_UNISTD_MACROS_H
-#ifdef __unix__
+#ifdef __linux__
#include "linux/unistd-macros.h"
#endif
void *__owner;
unsigned long long __lock_count;
-#ifdef __unix__
+#ifdef __linux__
__futex_word __ftxw;
#else
#error "Mutex type not defined for the target platform."
#include <llvm-libc-types/__futex_word.h>
-#ifdef __unix__
+#ifdef __linux__
typedef __futex_word once_flag;
#else
#error "Once flag type not defined for the target platform."
#include <llvm-libc-types/__futex_word.h>
-#ifdef __unix__
+#ifdef __linux__
typedef __futex_word pthread_once_t;
#else
#error "Once flag type not defined for the target platform."
struct dirent {
ino_t d_ino;
-#ifdef __unix__
+#ifdef __linux__
off_t d_off;
unsigned short d_reclen;
#endif
#ifndef __LLVM_LIBC_TYPES_STRUCT_UTSNAME_H__
#define __LLVM_LIBC_TYPES_STRUCT_UTSNAME_H__
-#ifdef __unix__
+#ifdef __linux__
#define __UTS_NAME_LENGTH 65
#else
// Arbitray default. Should be specialized for each platform.
char release[__UTS_NAME_LENGTH];
char version[__UTS_NAME_LENGTH];
char machine[__UTS_NAME_LENGTH];
-#ifdef __unix__
+#ifdef __linux__
char domainname[__UTS_NAME_LENGTH];
#endif
};
return nullptr;
struct ::dirent *d = reinterpret_cast<struct ::dirent *>(buffer + readptr);
-#ifdef __unix__
+#ifdef __linux__
// The d_reclen field is available on Linux but not required by POSIX.
readptr += d->d_reclen;
#else
#include "gpu/io.h"
#elif defined(__APPLE__)
#include "darwin/io.h"
-#elif defined(__unix__)
+#elif defined(__linux__)
#include "linux/io.h"
#elif defined(__Fuchsia__)
#include "fuchsia/io.h"
#include "gpu/quick_exit.h"
#elif defined(__APPLE__)
#include "darwin/quick_exit.h"
-#elif defined(__unix__)
+#elif defined(__linux__)
#include "linux/quick_exit.h"
#endif
#ifdef __APPLE__
#include "darwin/syscall.h"
-#elif defined(__unix__)
+#elif defined(__linux__)
#include "linux/syscall.h"
#endif
// few global locks. So, to avoid static initialization order fiasco, we
// want the constructors of the Mutex classes to be constexprs.
-#if defined(__unix__)
+#if defined(__linux__)
#include "linux/mutex.h"
#elif defined(LIBC_TARGET_ARCH_IS_GPU)
#include "gpu/mutex.h"
-#endif // __unix__
+#endif // __linux__
namespace __llvm_libc {