Commit cff575fb authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Implemented _(w)access_s.

parent f8f7b289
......@@ -490,7 +490,7 @@
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl _access(str long) msvcrt._access
@ stub _access_s
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
@ cdecl _aligned_free(ptr) msvcrt._aligned_free
@ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc
......@@ -1274,7 +1274,7 @@
@ stub _vwprintf_p_l
@ stub _vwprintf_s_l
@ cdecl _waccess(wstr long) msvcrt._waccess
@ stub _waccess_s
@ cdecl _waccess_s(wstr long) msvcrt.waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@ stub _wassert
......
......@@ -314,7 +314,7 @@
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl _access(str long) msvcrt._access
@ stub _access_s
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
@ stdcall -arch=i386 _adj_fdiv_m16i(long) msvcrt._adj_fdiv_m16i
@ stdcall -arch=i386 _adj_fdiv_m32(long) msvcrt._adj_fdiv_m32
......@@ -1127,7 +1127,7 @@
@ stub _vwprintf_p_l
@ stub _vwprintf_s_l
@ cdecl _waccess(wstr long) msvcrt._waccess
@ stub _waccess_s
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@ stub _wassert
......
......@@ -306,7 +306,7 @@
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl _access(str long) msvcrt._access
@ stub _access_s
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
@ stdcall -arch=i386 _adj_fdiv_m16i(long) msvcrt._adj_fdiv_m16i
@ stdcall -arch=i386 _adj_fdiv_m32(long) msvcrt._adj_fdiv_m32
......@@ -1114,7 +1114,7 @@
@ stub _vwprintf_p_l
@ stub _vwprintf_s_l
@ cdecl _waccess(wstr long) msvcrt._waccess
@ stub _waccess_s
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@ stub _wassert
......
......@@ -55,6 +55,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
/* _access() bit flags FIXME: incomplete */
#define MSVCRT_W_OK 0x02
#define MSVCRT_R_OK 0x04
/* values for wxflag in file descriptor */
#define WX_OPEN 0x01
......@@ -507,6 +508,21 @@ int CDECL MSVCRT__access(const char *filename, int mode)
}
/*********************************************************************
* _access_s (MSVCRT.@)
*/
int CDECL _access_s(const char *filename, int mode)
{
if (!MSVCRT_CHECK_PMT(filename != NULL) ||
!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0))
{
*MSVCRT__errno() = MSVCRT_EINVAL;
return -1;
}
return MSVCRT__access(filename, mode);
}
/*********************************************************************
* _waccess (MSVCRT.@)
*/
int CDECL _waccess(const MSVCRT_wchar_t *filename, int mode)
......@@ -529,6 +545,21 @@ int CDECL _waccess(const MSVCRT_wchar_t *filename, int mode)
}
/*********************************************************************
* _waccess_s (MSVCRT.@)
*/
int CDECL _waccess_s(const MSVCRT_wchar_t *filename, int mode)
{
if (!MSVCRT_CHECK_PMT(filename != NULL) ||
!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0))
{
*MSVCRT__errno() = MSVCRT_EINVAL;
return -1;
}
return _waccess(filename, mode);
}
/*********************************************************************
* _chmod (MSVCRT.@)
*/
int CDECL MSVCRT__chmod(const char *path, int flags)
......
......@@ -271,7 +271,7 @@
@ cdecl _abnormal_termination()
# stub _abs64
@ cdecl _access(str long) MSVCRT__access
# stub _access_s
@ cdecl _access_s(str long)
@ extern _acmdln MSVCRT__acmdln
@ stdcall -arch=i386 _adj_fdiv_m16i(long)
@ stdcall -arch=i386 _adj_fdiv_m32(long)
......@@ -1046,7 +1046,7 @@
# stub _vwprintf_p_l
# stub _vwprintf_s_l
@ cdecl _waccess(wstr long)
# stub _waccess_s
@ cdecl _waccess_s(wstr long)
@ cdecl _wasctime(ptr) MSVCRT__wasctime
# stub _wasctime_s
# stub _wassert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment