mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
refactor: eliminate os_unix.c #21621
This commit is contained in:
@@ -121,7 +121,6 @@
|
|||||||
{ include: [ '"os/shell.h.generated.h"', private, '"nvim/os/shell.h"', public ] },
|
{ include: [ '"os/shell.h.generated.h"', private, '"nvim/os/shell.h"', public ] },
|
||||||
{ include: [ '"os/signal.h.generated.h"', private, '"nvim/os/signal.h"', public ] },
|
{ include: [ '"os/signal.h.generated.h"', private, '"nvim/os/signal.h"', public ] },
|
||||||
{ include: [ '"os/time.h.generated.h"', private, '"nvim/os/time.h"', public ] },
|
{ include: [ '"os/time.h.generated.h"', private, '"nvim/os/time.h"', public ] },
|
||||||
{ include: [ '"os_unix.h.generated.h"', private, '"nvim/os_unix.h"', public ] },
|
|
||||||
{ include: [ '"path.h.generated.h"', private, '"nvim/path.h"', public ] },
|
{ include: [ '"path.h.generated.h"', private, '"nvim/path.h"', public ] },
|
||||||
{ include: [ '"plines.h.generated.h"', private, '"nvim/plines.h"', public ] },
|
{ include: [ '"plines.h.generated.h"', private, '"nvim/plines.h"', public ] },
|
||||||
{ include: [ '"popupmenu.h.generated.h"', private, '"nvim/popupmenu.h"', public ] },
|
{ include: [ '"popupmenu.h.generated.h"', private, '"nvim/popupmenu.h"', public ] },
|
||||||
|
@@ -52,7 +52,6 @@
|
|||||||
#include "nvim/os/input.h"
|
#include "nvim/os/input.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/os/time.h"
|
#include "nvim/os/time.h"
|
||||||
#include "nvim/os_unix.h"
|
|
||||||
#include "nvim/path.h"
|
#include "nvim/path.h"
|
||||||
#include "nvim/pos.h"
|
#include "nvim/pos.h"
|
||||||
#include "nvim/regexp.h"
|
#include "nvim/regexp.h"
|
||||||
|
@@ -779,6 +779,38 @@ int os_setperm(const char *const name, int perm)
|
|||||||
return (r == kLibuvSuccess ? OK : FAIL);
|
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
|
||||||
|
|
||||||
|
// 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_u *fname)
|
||||||
|
{
|
||||||
|
vim_acl_T ret = NULL;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the ACL of file "fname" to "acl" (unless it's NULL).
|
||||||
|
void os_set_acl(const char_u *fname, vim_acl_T aclent)
|
||||||
|
{
|
||||||
|
if (aclent == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void os_free_acl(vim_acl_T aclent)
|
||||||
|
{
|
||||||
|
if (aclent == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
/// Checks if the current user owns a file.
|
/// Checks if the current user owns a file.
|
||||||
///
|
///
|
||||||
|
@@ -1,42 +0,0 @@
|
|||||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
|
||||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
|
||||||
|
|
||||||
#include "nvim/os/os_defs.h"
|
|
||||||
#include "nvim/os_unix.h"
|
|
||||||
#include "nvim/types.h"
|
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
|
||||||
# include "os_unix.c.generated.h" // IWYU pragma: export
|
|
||||||
#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
|
|
||||||
|
|
||||||
// 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_u *fname)
|
|
||||||
{
|
|
||||||
vim_acl_T ret = NULL;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the ACL of file "fname" to "acl" (unless it's NULL).
|
|
||||||
void os_set_acl(const char_u *fname, vim_acl_T aclent)
|
|
||||||
{
|
|
||||||
if (aclent == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void os_free_acl(vim_acl_T aclent)
|
|
||||||
{
|
|
||||||
if (aclent == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
@@ -1,10 +0,0 @@
|
|||||||
#ifndef NVIM_OS_UNIX_H
|
|
||||||
#define NVIM_OS_UNIX_H
|
|
||||||
|
|
||||||
#include "nvim/os/shell.h"
|
|
||||||
#include "nvim/types.h"
|
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
|
||||||
# include "os_unix.h.generated.h"
|
|
||||||
#endif
|
|
||||||
#endif // NVIM_OS_UNIX_H
|
|
@@ -116,7 +116,6 @@
|
|||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/os/os_defs.h"
|
#include "nvim/os/os_defs.h"
|
||||||
#include "nvim/os/time.h"
|
#include "nvim/os/time.h"
|
||||||
#include "nvim/os_unix.h"
|
|
||||||
#include "nvim/path.h"
|
#include "nvim/path.h"
|
||||||
#include "nvim/pos.h"
|
#include "nvim/pos.h"
|
||||||
#include "nvim/screen.h"
|
#include "nvim/screen.h"
|
||||||
|
Reference in New Issue
Block a user