[PATCH] D75707: [CMake] Delete HAVE_ISATTY
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 13:44:33 PST 2020
MaskRay created this revision.
MaskRay added reviewers: adalava, Bdragon28, probinson.
Herald added subscribers: llvm-commits, hiraditya, mgorny.
Herald added a project: LLVM.
unistd.h provides isatty. It is provided by 4.3BSD and SVR4, and is
required by POSIX.1-2001. If an old commercial UNIX indeed screw it up,
its libc must lack enough utilities to build LLVM. We should not support
such an ancient system.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75707
Files:
llvm/cmake/config-ix.cmake
llvm/include/llvm/Config/config.h.cmake
llvm/lib/Support/Unix/Process.inc
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Index: llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -203,7 +203,6 @@
"HAVE_GETPAGESIZE=",
"HAVE_GETRLIMIT=",
"HAVE_GETRUSAGE=",
- "HAVE_ISATTY=",
"HAVE_LIBPTHREAD=",
"HAVE_PTHREAD_SETNAME_NP=",
"HAVE_LIBZ=",
@@ -241,7 +240,6 @@
"HAVE_GETPAGESIZE=1",
"HAVE_GETRLIMIT=1",
"HAVE_GETRUSAGE=1",
- "HAVE_ISATTY=1",
"HAVE_LIBPTHREAD=1",
"HAVE_PTHREAD_SETNAME_NP=1",
"HAVE_LIBZ=1",
Index: llvm/lib/Support/Unix/Process.inc
===================================================================
--- llvm/lib/Support/Unix/Process.inc
+++ llvm/lib/Support/Unix/Process.inc
@@ -272,12 +272,7 @@
}
bool Process::FileDescriptorIsDisplayed(int fd) {
-#if HAVE_ISATTY
return isatty(fd);
-#else
- // If we don't have isatty, just return false.
- return false;
-#endif
}
static unsigned getColumns(int FileID) {
Index: llvm/include/llvm/Config/config.h.cmake
===================================================================
--- llvm/include/llvm/Config/config.h.cmake
+++ llvm/include/llvm/Config/config.h.cmake
@@ -88,9 +88,6 @@
/* Define to 1 if you have the `getrusage' function. */
#cmakedefine HAVE_GETRUSAGE ${HAVE_GETRUSAGE}
-/* Define to 1 if you have the `isatty' function. */
-#cmakedefine HAVE_ISATTY 1
-
/* Define to 1 if you have the `edit' library (-ledit). */
#cmakedefine HAVE_LIBEDIT ${HAVE_LIBEDIT}
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -198,7 +198,6 @@
check_symbol_exists(sysconf unistd.h HAVE_SYSCONF)
check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
-check_symbol_exists(isatty unistd.h HAVE_ISATTY)
check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS)
check_symbol_exists(futimes sys/time.h HAVE_FUTIMES)
check_symbol_exists(posix_fallocate fcntl.h HAVE_POSIX_FALLOCATE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75707.248595.patch
Type: text/x-patch
Size: 2209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200305/48953bb0/attachment-0001.bin>
More information about the llvm-commits
mailing list