mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:43:01 +00:00
- Completely rewrite most of stdio functions by merging Wine's msvcrt code adapted for ReactOS.
- Leave and refactor existing underlying linux-code based sprintf implementation into lnx_ prefixed functions. - Misc source code and headers cleanup. - Fixes bugs 2910, 2803. See issue #2803 for more details. svn path=/trunk/; revision=33927
This commit is contained in:
parent
553e9f4821
commit
7b57917c46
137 changed files with 1918 additions and 6187 deletions
36
reactos/lib/sdk/crt/stdio/access.c
Normal file
36
reactos/lib/sdk/crt/stdio/access.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include <precomp.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define _TS S
|
||||
#define sT "S"
|
||||
#else
|
||||
#define _TS s
|
||||
#define sT "s"
|
||||
#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