aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-12-16 08:24:29 -0500
committerGitHub <noreply@github.com>2021-12-16 08:24:29 -0500
commit56fa08b458cbf98fa83c21c3e683f8e7e91a334f (patch)
tree986cb81075e6c91c0454199e533f2181bec6bb1a /config
parenta402b5e2d58c53f0343e5b01ddf9caca961f30ab (diff)
parent2c8f4d0912a280ae55d73d96d0ca2ed96b8fde8a (diff)
downloadrneovim-56fa08b458cbf98fa83c21c3e683f8e7e91a334f.tar.gz
rneovim-56fa08b458cbf98fa83c21c3e683f8e7e91a334f.tar.bz2
rneovim-56fa08b458cbf98fa83c21c3e683f8e7e91a334f.zip
Merge pull request #16617 from pekdon/forkpty
fix: add forkpty for SunOS variants
Diffstat (limited to 'config')
-rw-r--r--config/CMakeLists.txt13
-rw-r--r--config/config.h.in1
2 files changed, 14 insertions, 0 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 30f08c5297..8f93e1eb27 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -50,6 +50,19 @@ check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(strptime HAVE_STRPTIME)
+if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ check_c_source_compiles("
+#include <termios.h>
+int
+main(void)
+{
+ return forkpty(0, NULL, NULL, NULL);
+}
+" HAVE_FORKPTY)
+else()
+ set(HAVE_FORKPTY 1)
+endif()
+
# Symbols
check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC)
if(HAVE_LANGINFO_H)
diff --git a/config/config.h.in b/config/config.h.in
index b0635fb52b..b44b7238d2 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -50,6 +50,7 @@
# undef HAVE_SYS_UIO_H
# endif
#endif
+#cmakedefine HAVE_FORKPTY
#cmakedefine FEAT_TUI