aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorClaes Nästén <pekdon@gmail.com>2021-12-09 20:01:19 +0100
committerClaes Nästén <pekdon@gmail.com>2021-12-12 11:29:56 +0000
commit2c8f4d0912a280ae55d73d96d0ca2ed96b8fde8a (patch)
tree24d1cdb63fa3fb67c962df055129da4f2b97d751 /config
parentac2d140a33dfe88f882218e15a443b8300cca6b2 (diff)
downloadrneovim-2c8f4d0912a280ae55d73d96d0ca2ed96b8fde8a.tar.gz
rneovim-2c8f4d0912a280ae55d73d96d0ca2ed96b8fde8a.tar.bz2
rneovim-2c8f4d0912a280ae55d73d96d0ca2ed96b8fde8a.zip
fix: add forkpty for SunOS variants
forkpty is missing on Solaris < 11 and Illumos, provide fallback implementation for non Solaris 11 users.
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