diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-06-06 14:00:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 20:00:32 +0800 |
commit | f5d12889e80d3369359b8248806694cf6d21f820 (patch) | |
tree | 8c3c03b9cb4a6806956d5bf6b87e9ff4a0cf24d2 /src/nvim/os/fs.c | |
parent | 7b973c71ea845c9bcc6d98e101ad5a7956cb5802 (diff) | |
download | rneovim-f5d12889e80d3369359b8248806694cf6d21f820.tar.gz rneovim-f5d12889e80d3369359b8248806694cf6d21f820.tar.bz2 rneovim-f5d12889e80d3369359b8248806694cf6d21f820.zip |
refactor: adjust headers according to the style guide (#23934)
System headers should be included first to prevent naming conflicts.
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r-- | src/nvim/os/fs.c | 24 |
1 files changed, 13 insertions, 11 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. |