diff options
author | James McCoy <jamessan@jamessan.com> | 2021-12-09 21:09:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-09 21:09:22 -0500 |
commit | 0cf546508d3bb3f51fc1d440ce5bd798edd70e82 (patch) | |
tree | 52383f48e92a9e8e673347b0e29a3dd1a627d745 /src/nvim/os | |
parent | 27648ee21803aabfced13b55b36671c4cf726703 (diff) | |
parent | 05f9f63f2478841f9fa6261c68663797fa9d43f6 (diff) | |
download | rneovim-0cf546508d3bb3f51fc1d440ce5bd798edd70e82.tar.gz rneovim-0cf546508d3bb3f51fc1d440ce5bd798edd70e82.tar.bz2 rneovim-0cf546508d3bb3f51fc1d440ce5bd798edd70e82.zip |
Merge pull request #16547 from pekdon/sunos
Portability improvements, first steps at getting neovim on x86_64 SunOS
Diffstat (limited to 'src/nvim/os')
-rw-r--r-- | src/nvim/os/os_defs.h | 4 | ||||
-rw-r--r-- | src/nvim/os/pty_process_unix.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h index 8049b3b80e..dce4b0c187 100644 --- a/src/nvim/os/os_defs.h +++ b/src/nvim/os/os_defs.h @@ -13,6 +13,10 @@ # include "nvim/os/unix_defs.h" #endif +#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX) +#define NAME_MAX _XOPEN_NAME_MAX +#endif + #define BASENAMELEN (NAME_MAX - 5) // Use the system path length if it makes sense. diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index 24ecf5c24f..450bc75ffb 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -15,7 +15,7 @@ # include <libutil.h> #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include <util.h> -#else +#elif !defined(__sun) # include <pty.h> #endif @@ -198,7 +198,9 @@ static void init_termios(struct termios *termios) FUNC_ATTR_NONNULL_ALL termios->c_cflag = CS8|CREAD; termios->c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK; - cfsetspeed(termios, 38400); + // not using cfsetspeed, not available on all platforms + cfsetispeed(termios, 38400); + cfsetospeed(termios, 38400); #ifdef IUTF8 termios->c_iflag |= IUTF8; |