diff options
Diffstat (limited to 'src/nvim/os')
-rw-r--r-- | src/nvim/os/fs.c | 24 | ||||
-rw-r--r-- | src/nvim/os/os_defs.h | 12 | ||||
-rw-r--r-- | src/nvim/os/process.c | 14 | ||||
-rw-r--r-- | src/nvim/os/pty_process_unix.c | 3 | ||||
-rw-r--r-- | src/nvim/os/pty_process_win.c | 2 | ||||
-rw-r--r-- | src/nvim/os/signal.c | 2 |
6 files changed, 30 insertions, 27 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index d270f8767e..6c3eca8961 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -14,6 +14,19 @@ #include <sys/stat.h> #include <uv.h> +#ifdef MSWIN +# include <shlobj.h> +#endif + +#if defined(HAVE_ACL) +# ifdef HAVE_SYS_ACL_H +# include <sys/acl.h> +# endif +# ifdef HAVE_SYS_ACCESS_H +# include <sys/access.h> +# endif +#endif + #include "auto/config.h" #include "nvim/ascii.h" #include "nvim/gettext.h" @@ -731,15 +744,6 @@ int os_setperm(const char *const name, int perm) return (r == kLibuvSuccess ? OK : FAIL); } -#if defined(HAVE_ACL) -# ifdef HAVE_SYS_ACL_H -# include <sys/acl.h> -# endif -# ifdef HAVE_SYS_ACCESS_H -# include <sys/access.h> -# endif -#endif - // Return a pointer to the ACL of file "fname" in allocated memory. // Return NULL if the ACL is not available for whatever reason. vim_acl_T os_get_acl(const char *fname) @@ -1225,8 +1229,6 @@ char *os_realpath(const char *name, char *buf) } #ifdef MSWIN -# include <shlobj.h> - /// When "fname" is the name of a shortcut (*.lnk) resolve the file it points /// to and return that name in allocated memory. /// Otherwise NULL is returned. diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h index c595013a21..1e0f5b77f8 100644 --- a/src/nvim/os/os_defs.h +++ b/src/nvim/os/os_defs.h @@ -7,6 +7,12 @@ #include <sys/stat.h> #include <sys/types.h> +// Note: Some systems need both string.h and strings.h (Savage). +#include <string.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif + #ifdef MSWIN # include "nvim/os/win_defs.h" #else @@ -36,12 +42,6 @@ // Command-processing buffer. Use large buffers for all platforms. #define CMDBUFFSIZE 1024 -// Note: Some systems need both string.h and strings.h (Savage). -#include <string.h> -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif - /// Converts libuv error (negative int) to error description string. #define os_strerror uv_strerror diff --git a/src/nvim/os/process.c b/src/nvim/os/process.c index 98ae251e2b..a636689f97 100644 --- a/src/nvim/os/process.c +++ b/src/nvim/os/process.c @@ -13,14 +13,8 @@ #include <stdio.h> #include <uv.h> -#include "nvim/log.h" -#include "nvim/memory.h" -#include "nvim/os/process.h" - #ifdef MSWIN # include <tlhelp32.h> - -# include "nvim/api/private/helpers.h" #endif #if defined(__FreeBSD__) // XXX: OpenBSD ? @@ -38,6 +32,14 @@ # include <sys/sysctl.h> #endif +#include "nvim/log.h" +#include "nvim/memory.h" +#include "nvim/os/process.h" + +#ifdef MSWIN +# include "nvim/api/private/helpers.h" +#endif + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "os/process.c.generated.h" // IWYU pragma: export #endif diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index 2413f0339b..b5423c59d7 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -11,6 +11,7 @@ #include <string.h> #include <sys/ioctl.h> #include <sys/wait.h> +#include <uv.h> // forkpty is not in POSIX, so headers are platform-specific #if defined(__FreeBSD__) || defined(__DragonFly__) @@ -31,8 +32,6 @@ # include <crt_externs.h> #endif -#include <uv.h> - #include "auto/config.h" #include "klib/klist.h" #include "nvim/eval/typval.h" diff --git a/src/nvim/os/pty_process_win.c b/src/nvim/os/pty_process_win.c index a8330acd54..abeb020645 100644 --- a/src/nvim/os/pty_process_win.c +++ b/src/nvim/os/pty_process_win.c @@ -7,7 +7,7 @@ #include "nvim/ascii.h" #include "nvim/eval/typval.h" -#include "nvim/mbyte.h" // for utf8_to_utf16, utf16_to_utf8 +#include "nvim/mbyte.h" #include "nvim/memory.h" #include "nvim/os/os.h" #include "nvim/os/pty_conpty_win.h" diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c index e7b745fb7e..56fd2125c2 100644 --- a/src/nvim/os/signal.c +++ b/src/nvim/os/signal.c @@ -5,7 +5,7 @@ #include <stdbool.h> #include <stdio.h> #ifndef MSWIN -# include <signal.h> // for sigset_t +# include <signal.h> #endif #include "nvim/autocmd.h" |