msvcrt: Implemented _(w)access_s.

This commit is contained in:
Eric Pouech 2010-11-02 22:03:41 +01:00 committed by Alexandre Julliard
parent f8f7b2898c
commit cff575fbb3
5 changed files with 39 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -506,6 +507,21 @@ int CDECL MSVCRT__access(const char *filename, int mode)
return 0;
}
/*********************************************************************
* _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.@)
*/
@ -528,6 +544,21 @@ int CDECL _waccess(const MSVCRT_wchar_t *filename, int mode)
return 0;
}
/*********************************************************************
* _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.@)
*/

View File

@ -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