diff --git a/libc/include/llvm-libc-macros/fcntl-macros.h b/libc/include/llvm-libc-macros/fcntl-macros.h --- a/libc/include/llvm-libc-macros/fcntl-macros.h +++ b/libc/include/llvm-libc-macros/fcntl-macros.h @@ -1,7 +1,7 @@ #ifndef __LLVM_LIBC_MACROS_FCNTL_MACROS_H #define __LLVM_LIBC_MACROS_FCNTL_MACROS_H -#ifdef __unix__ +#ifdef __linux__ #include "linux/fcntl-macros.h" #endif diff --git a/libc/include/llvm-libc-macros/sched-macros.h b/libc/include/llvm-libc-macros/sched-macros.h --- a/libc/include/llvm-libc-macros/sched-macros.h +++ b/libc/include/llvm-libc-macros/sched-macros.h @@ -9,7 +9,7 @@ #ifndef __LLVM_LIBC_MACROS_SCHED_MACROS_H #define __LLVM_LIBC_MACROS_SCHED_MACROS_H -#ifdef __unix__ +#ifdef __linux__ #include "linux/sched-macros.h" #endif diff --git a/libc/include/llvm-libc-macros/sys-ioctl-macros.h b/libc/include/llvm-libc-macros/sys-ioctl-macros.h --- a/libc/include/llvm-libc-macros/sys-ioctl-macros.h +++ b/libc/include/llvm-libc-macros/sys-ioctl-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-mman-macros.h b/libc/include/llvm-libc-macros/sys-mman-macros.h --- a/libc/include/llvm-libc-macros/sys-mman-macros.h +++ b/libc/include/llvm-libc-macros/sys-mman-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-random-macros.h b/libc/include/llvm-libc-macros/sys-random-macros.h --- a/libc/include/llvm-libc-macros/sys-random-macros.h +++ b/libc/include/llvm-libc-macros/sys-random-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-resource-macros.h b/libc/include/llvm-libc-macros/sys-resource-macros.h --- a/libc/include/llvm-libc-macros/sys-resource-macros.h +++ b/libc/include/llvm-libc-macros/sys-resource-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-socket-macros.h b/libc/include/llvm-libc-macros/sys-socket-macros.h --- a/libc/include/llvm-libc-macros/sys-socket-macros.h +++ b/libc/include/llvm-libc-macros/sys-socket-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-stat-macros.h b/libc/include/llvm-libc-macros/sys-stat-macros.h --- a/libc/include/llvm-libc-macros/sys-stat-macros.h +++ b/libc/include/llvm-libc-macros/sys-stat-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/sys-time-macros.h b/libc/include/llvm-libc-macros/sys-time-macros.h --- a/libc/include/llvm-libc-macros/sys-time-macros.h +++ b/libc/include/llvm-libc-macros/sys-time-macros.h @@ -9,7 +9,7 @@ #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 diff --git a/libc/include/llvm-libc-macros/time-macros.h b/libc/include/llvm-libc-macros/time-macros.h --- a/libc/include/llvm-libc-macros/time-macros.h +++ b/libc/include/llvm-libc-macros/time-macros.h @@ -1,7 +1,7 @@ #ifndef __LLVM_LIBC_MACROS_TIME_MACROS_H #define __LLVM_LIBC_MACROS_TIME_MACROS_H -#ifdef __unix__ +#ifdef __linux__ #include "linux/time-macros.h" #endif diff --git a/libc/include/llvm-libc-macros/unistd-macros.h b/libc/include/llvm-libc-macros/unistd-macros.h --- a/libc/include/llvm-libc-macros/unistd-macros.h +++ b/libc/include/llvm-libc-macros/unistd-macros.h @@ -1,7 +1,7 @@ #ifndef __LLVM_LIBC_MACROS_UNISTD_MACROS_H #define __LLVM_LIBC_MACROS_UNISTD_MACROS_H -#ifdef __unix__ +#ifdef __linux__ #include "linux/unistd-macros.h" #endif diff --git a/libc/include/llvm-libc-types/struct_dirent.h b/libc/include/llvm-libc-types/struct_dirent.h --- a/libc/include/llvm-libc-types/struct_dirent.h +++ b/libc/include/llvm-libc-types/struct_dirent.h @@ -14,7 +14,7 @@ struct dirent { ino_t d_ino; -#ifdef __unix__ +#ifdef __linux__ off_t d_off; unsigned short d_reclen; #endif diff --git a/libc/include/llvm-libc-types/struct_utsname.h b/libc/include/llvm-libc-types/struct_utsname.h --- a/libc/include/llvm-libc-types/struct_utsname.h +++ b/libc/include/llvm-libc-types/struct_utsname.h @@ -9,7 +9,7 @@ #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. @@ -22,7 +22,7 @@ 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 }; diff --git a/libc/src/__support/File/dir.cpp b/libc/src/__support/File/dir.cpp --- a/libc/src/__support/File/dir.cpp +++ b/libc/src/__support/File/dir.cpp @@ -39,7 +39,7 @@ return nullptr; struct ::dirent *d = reinterpret_cast(buffer + readptr); -#ifdef __unix__ +#ifdef __linux__ // The d_reclen field is available on Linux but not required by POSIX. readptr += d->d_reclen; #else diff --git a/libc/src/__support/OSUtil/io.h b/libc/src/__support/OSUtil/io.h --- a/libc/src/__support/OSUtil/io.h +++ b/libc/src/__support/OSUtil/io.h @@ -15,7 +15,7 @@ #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" diff --git a/libc/src/__support/OSUtil/quick_exit.h b/libc/src/__support/OSUtil/quick_exit.h --- a/libc/src/__support/OSUtil/quick_exit.h +++ b/libc/src/__support/OSUtil/quick_exit.h @@ -15,7 +15,7 @@ #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 diff --git a/libc/src/__support/OSUtil/syscall.h b/libc/src/__support/OSUtil/syscall.h --- a/libc/src/__support/OSUtil/syscall.h +++ b/libc/src/__support/OSUtil/syscall.h @@ -11,7 +11,7 @@ #ifdef __APPLE__ #include "darwin/syscall.h" -#elif defined(__unix__) +#elif defined(__linux__) #include "linux/syscall.h" #endif