mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:13:23 +00:00
Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.
svn path=/branches/ntvdm/; revision=59241
This commit is contained in:
parent
3e3200acef
commit
4f0b8d3db0
20620 changed files with 0 additions and 1232833 deletions
38
lib/sdk/crt/stdio/access.c
Normal file
38
lib/sdk/crt/stdio/access.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <precomp.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define _TS S
|
||||
#define sT "S"
|
||||
#define access_dirT access_dirW
|
||||
#else
|
||||
#define _TS s
|
||||
#define sT "s"
|
||||
#define access_dirT access_dirA
|
||||
#endif
|
||||
|
||||
#define MK_STR(s) #s
|
||||
|
||||
/*
|
||||
* INTERNAL
|
||||
*/
|
||||
int access_dirT(const _TCHAR *_path)
|
||||
{
|
||||
DWORD Attributes = GetFileAttributes(_path);
|
||||
TRACE(MK_STR(is_dirT)"('%"sT"')\n", _path);
|
||||
|
||||
if (Attributes == (DWORD)-1) {
|
||||
_dosmaperr(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
_set_errno(EACCES);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue