ReactOS 0.4.15-dev-7918-g2a2556c
eaccess.c File Reference
#include <schily/mconfig.h>
#include <schily/unistd.h>
#include <schily/standard.h>
#include <schily/errno.h>
#include <schily/schily.h>
Include dependency graph for eaccess.c:

Go to the source code of this file.

Functions

EXPORT int eaccess __PR ((const char *name, int mode))
 
EXPORT int eaccess (char *name, int mode) const
 

Variables

static UConst char sccsid []
 

Function Documentation

◆ __PR()

EXPORT int eaccess __PR ( (const char *name, int mode )

◆ eaccess()

EXPORT int eaccess ( char name,
int  mode 
) const

Definition at line 35 of file eaccess.c.

38{
39#ifdef HAVE_EUIDACCESS
40 return (euidaccess(name, mode));
41#else
42#ifdef HAVE_ACCESS_E_OK
43 return (access(name, E_OK|mode));
44#else
45 if (getuid() == geteuid() && getgid() == getegid())
46 return (access(name, mode));
47#ifdef EOPNOTSUPP
49#else
51#endif
52 return (-1);
53#endif
54#endif
55}
#define EINVAL
Definition: acclib.h:90
uid_t getuid()
Definition: uid.c:27
#define EOPNOTSUPP
Definition: errno.h:104
EXPORT gid_t getegid()
Definition: gid.c:37
EXPORT gid_t getgid()
Definition: gid.c:27
GLenum mode
Definition: glext.h:6217
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
EXPORT int seterrno(int err)
Definition: seterrno.c:34
Definition: name.c:39
#define E_OK
Definition: unistd.h:112
EXPORT uid_t geteuid()
Definition: uid.c:37

Referenced by searchonefile().

Variable Documentation

◆ sccsid

UConst char sccsid[]
static
Initial value:
=
"@(#)eaccess.c 1.6 14/05/15 Copyright 2004-2014 J. Schilling"

Definition at line 4 of file eaccess.c.