diff --git a/libc/src/__support/File/linux_file.cpp b/libc/src/__support/File/linux_file.cpp --- a/libc/src/__support/File/linux_file.cpp +++ b/libc/src/__support/File/linux_file.cpp @@ -139,7 +139,7 @@ int fd = __llvm_libc::syscall_impl(SYS_openat, AT_FDCWD, path, open_flags, OPEN_MODE); #else -#error "SYS_open and SYS_openat syscalls not available to perform a file open." +#error "open and openat syscalls not available." #endif if (fd < 0) diff --git a/libc/src/__support/threads/linux/thread.cpp b/libc/src/__support/threads/linux/thread.cpp --- a/libc/src/__support/threads/linux/thread.cpp +++ b/libc/src/__support/threads/linux/thread.cpp @@ -33,10 +33,10 @@ #ifdef SYS_mmap2 static constexpr long MMAP_SYSCALL_NUMBER = SYS_mmap2; -#elif SYS_mmap +#elif defined(SYS_mmap) static constexpr long MMAP_SYSCALL_NUMBER = SYS_mmap; #else -#error "SYS_mmap or SYS_mmap2 not available on the target platform" +#error "mmap or mmap2 syscalls not available." #endif static constexpr size_t NAME_SIZE_MAX = 16; // Includes the null terminator diff --git a/libc/src/spawn/linux/posix_spawn.cpp b/libc/src/spawn/linux/posix_spawn.cpp --- a/libc/src/spawn/linux/posix_spawn.cpp +++ b/libc/src/spawn/linux/posix_spawn.cpp @@ -31,7 +31,7 @@ #elif defined(SYS_clone) return __llvm_libc::syscall_impl(SYS_clone, SIGCHLD, 0); #else -#error "SYS_fork or SYS_clone not available." +#error "fork or clone syscalls not available." #endif } @@ -58,7 +58,7 @@ #elif defined(SYS_dup3) long ret = __llvm_libc::syscall_impl(SYS_dup3, fd, newfd, 0); #else -#error "SYS_dup2 and SYS_dup3 not available for the target." +#error "dup2 and dup3 syscalls not available." #endif return ret < 0 ? false : true; } diff --git a/libc/src/sys/mman/linux/mmap.cpp b/libc/src/sys/mman/linux/mmap.cpp --- a/libc/src/sys/mman/linux/mmap.cpp +++ b/libc/src/sys/mman/linux/mmap.cpp @@ -33,10 +33,10 @@ #ifdef SYS_mmap2 offset /= EXEC_PAGESIZE; long syscall_number = SYS_mmap2; -#elif SYS_mmap +#elif defined(SYS_mmap) long syscall_number = SYS_mmap; #else -#error "Target platform does not have SYS_mmap or SYS_mmap2 defined" +#error "mmap or mmap2 syscalls not available." #endif long ret_val = diff --git a/libc/src/sys/stat/linux/chmod.cpp b/libc/src/sys/stat/linux/chmod.cpp --- a/libc/src/sys/stat/linux/chmod.cpp +++ b/libc/src/sys/stat/linux/chmod.cpp @@ -24,7 +24,7 @@ #elif defined(SYS_fchmodat) long ret = __llvm_libc::syscall_impl(SYS_fchmodat, AT_FDCWD, path, mode); #else -#error "chmod and chmodat syscalls not available." +#error "chmod and fchmodat syscalls not available." #endif if (ret < 0) { diff --git a/libc/src/sys/stat/linux/mkdirat.cpp b/libc/src/sys/stat/linux/mkdirat.cpp --- a/libc/src/sys/stat/linux/mkdirat.cpp +++ b/libc/src/sys/stat/linux/mkdirat.cpp @@ -21,7 +21,7 @@ #ifdef SYS_mkdirat long ret = __llvm_libc::syscall_impl(SYS_mkdirat, dfd, path, mode); #else -#error "mkdirat syscalls not available." +#error "mkdirat syscall not available." #endif if (ret < 0) { diff --git a/libc/src/unistd/linux/access.cpp b/libc/src/unistd/linux/access.cpp --- a/libc/src/unistd/linux/access.cpp +++ b/libc/src/unistd/linux/access.cpp @@ -23,7 +23,7 @@ #elif defined(SYS_faccessat) long ret = __llvm_libc::syscall_impl(SYS_faccessat, AT_FDCWD, path, mode, 0); #else -#error "access syscalls not available." +#error "access and faccessat syscalls not available." #endif if (ret < 0) { diff --git a/libc/src/unistd/linux/dup2.cpp b/libc/src/unistd/linux/dup2.cpp --- a/libc/src/unistd/linux/dup2.cpp +++ b/libc/src/unistd/linux/dup2.cpp @@ -35,7 +35,7 @@ } long ret = __llvm_libc::syscall_impl(SYS_dup3, oldfd, newfd, 0); #else -#error "SYS_dup2 and SYS_dup3 not available for the target." +#error "dup2 and dup3 syscalls not available." #endif if (ret < 0) { libc_errno = -ret; diff --git a/libc/src/unistd/linux/fork.cpp b/libc/src/unistd/linux/fork.cpp --- a/libc/src/unistd/linux/fork.cpp +++ b/libc/src/unistd/linux/fork.cpp @@ -29,7 +29,7 @@ #elif defined(SYS_clone) pid_t ret = __llvm_libc::syscall_impl(SYS_clone, SIGCHLD, 0); #else -#error "SYS_fork or SYS_clone not available." +#error "fork and clone syscalls not available." #endif if (ret == 0) { // Return value is 0 in the child process. diff --git a/libc/src/unistd/linux/link.cpp b/libc/src/unistd/linux/link.cpp --- a/libc/src/unistd/linux/link.cpp +++ b/libc/src/unistd/linux/link.cpp @@ -24,7 +24,7 @@ long ret = __llvm_libc::syscall_impl(SYS_linkat, AT_FDCWD, path1, AT_FDCWD, path2, 0); #else -#error "SYS_link or SYS_linkat not available." +#error "link or linkat syscalls not available." #endif if (ret < 0) { libc_errno = -ret; diff --git a/libc/src/unistd/linux/readlink.cpp b/libc/src/unistd/linux/readlink.cpp --- a/libc/src/unistd/linux/readlink.cpp +++ b/libc/src/unistd/linux/readlink.cpp @@ -26,7 +26,7 @@ ssize_t ret = __llvm_libc::syscall_impl(SYS_readlinkat, AT_FDCWD, path, buf, bufsize); #else -#error "SYS_readlink or SYS_readlinkat not available." +#error "readlink or readlinkat syscalls not available." #endif if (ret < 0) { libc_errno = -ret; diff --git a/libc/src/unistd/linux/symlink.cpp b/libc/src/unistd/linux/symlink.cpp --- a/libc/src/unistd/linux/symlink.cpp +++ b/libc/src/unistd/linux/symlink.cpp @@ -23,7 +23,7 @@ #elif defined(SYS_symlinkat) long ret = __llvm_libc::syscall_impl(SYS_symlinkat, path1, AT_FDCWD, path2); #else -#error "SYS_symlink or SYS_symlinkat not available." +#error "symlink or symlinkat syscalls not available." #endif if (ret < 0) { libc_errno = -ret; diff --git a/libc/src/unistd/linux/unlink.cpp b/libc/src/unistd/linux/unlink.cpp --- a/libc/src/unistd/linux/unlink.cpp +++ b/libc/src/unistd/linux/unlink.cpp @@ -23,7 +23,7 @@ #elif defined(SYS_unlinkat) long ret = __llvm_libc::syscall_impl(SYS_unlinkat, AT_FDCWD, path, 0); #else -#error "Unlink syscalls not available." +#error "unlink and unlinkat syscalls not available." #endif if (ret < 0) { diff --git a/libc/src/unistd/linux/unlinkat.cpp b/libc/src/unistd/linux/unlinkat.cpp --- a/libc/src/unistd/linux/unlinkat.cpp +++ b/libc/src/unistd/linux/unlinkat.cpp @@ -21,7 +21,7 @@ #ifdef SYS_unlinkat long ret = __llvm_libc::syscall_impl(SYS_unlinkat, dfd, path, flags); #else -#error "unlinkat syscall not available." +#error "unlinkat syscalls not available." #endif if (ret < 0) { diff --git a/libc/startup/linux/aarch64/start.cpp b/libc/startup/linux/aarch64/start.cpp --- a/libc/startup/linux/aarch64/start.cpp +++ b/libc/startup/linux/aarch64/start.cpp @@ -34,7 +34,7 @@ #elif SYS_mmap static constexpr long MMAP_SYSCALL_NUMBER = SYS_mmap; #else -#error "Target platform does not have SYS_mmap or SYS_mmap2 defined" +#error "mmap and mmap2 syscalls not available." #endif AppProperties app; diff --git a/libc/startup/linux/riscv64/start.cpp b/libc/startup/linux/riscv64/start.cpp --- a/libc/startup/linux/riscv64/start.cpp +++ b/libc/startup/linux/riscv64/start.cpp @@ -29,7 +29,7 @@ #elif SYS_mmap static constexpr long MMAP_SYSCALL_NUMBER = SYS_mmap; #else -#error "Target platform does not have SYS_mmap or SYS_mmap2 defined" +#error "mmap and mmap2 syscalls not available." #endif AppProperties app; diff --git a/libc/startup/linux/x86_64/start.cpp b/libc/startup/linux/x86_64/start.cpp --- a/libc/startup/linux/x86_64/start.cpp +++ b/libc/startup/linux/x86_64/start.cpp @@ -30,7 +30,7 @@ #elif SYS_mmap static constexpr long mmapSyscallNumber = SYS_mmap; #else -#error "Target platform does not have SYS_mmap or SYS_mmap2 defined" +#error "mmap and mmap2 syscalls not available." #endif AppProperties app; diff --git a/libc/test/src/unistd/syscall_test.cpp b/libc/test/src/unistd/syscall_test.cpp --- a/libc/test/src/unistd/syscall_test.cpp +++ b/libc/test/src/unistd/syscall_test.cpp @@ -41,7 +41,7 @@ #elif defined(SYS_symlinkat) ASSERT_GE(__llvm_libc::syscall(SYS_symlinkat, LINK_VAL, AT_FDCWD, LINK), 0l); #else -#error "Symlink syscalls not available." +#error "symlink and symlinkat syscalls not available." #endif ASSERT_EQ(libc_errno, 0); @@ -61,7 +61,7 @@ #elif defined(SYS_unlinkat) ASSERT_GE(__llvm_libc::syscall(SYS_unlinkat, AT_FDCWD, LINK, 0), 0l); #else -#error "Unlink syscalls not available." +#error "unlink and unlinkat syscalls not available." #endif ASSERT_EQ(libc_errno, 0); } @@ -79,7 +79,7 @@ int fd = __llvm_libc::syscall(SYS_openat, AT_FDCWD, TEST_FILE, O_WRONLY | O_CREAT, S_IRWXU); #else -#error "Open syscalls not available to available." +#error "open and openat syscalls not available." #endif ASSERT_GT(fd, 0); ASSERT_EQ(libc_errno, 0); @@ -115,7 +115,7 @@ int write_fd = __llvm_libc::syscall(SYS_openat, AT_FDCWD, TEST_FILE_PATH, O_WRONLY | O_CREAT, S_IRWXU); #else -#error "Open syscalls not available to available." +#error "open and openat syscalls not available." #endif ASSERT_GT(write_fd, 0); ASSERT_EQ(libc_errno, 0); @@ -129,7 +129,7 @@ int dir_fd = __llvm_libc::syscall(SYS_openat, AT_FDCWD, TEST_DIR, O_DIRECTORY, 0); #else -#error "Open syscalls not available to available." +#error "open and openat syscalls not available." #endif ASSERT_GT(dir_fd, 0); ASSERT_EQ(libc_errno, 0); @@ -144,7 +144,7 @@ int link_fd = __llvm_libc::syscall(SYS_openat, AT_FDCWD, TEST_FILE_LINK_PATH, O_PATH, 0); #else -#error "Open syscalls not available to available." +#error "open and openat syscalls not available." #endif ASSERT_GT(link_fd, 0); ASSERT_EQ(libc_errno, 0); @@ -155,7 +155,7 @@ ASSERT_GE(__llvm_libc::syscall(SYS_unlinkat, AT_FDCWD, TEST_FILE_PATH, 0), 0l); #else -#error "Unlink syscalls not available." +#error "unlink and unlinkat syscalls not available." #endif ASSERT_EQ(libc_errno, 0); @@ -165,7 +165,7 @@ ASSERT_GE( __llvm_libc::syscall(SYS_unlinkat, AT_FDCWD, TEST_FILE_LINK_PATH, 0), 0l); #else -#error "Unlink syscalls not available." +#error "unlink and unlinkat syscalls not available." #endif ASSERT_EQ(libc_errno, 0);