msvcrt: Use __utimbuf{32,64} from public header.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-12-01 13:51:47 +01:00 committed by Alexandre Julliard
parent ebfe14d596
commit 2d471db92f
7 changed files with 38 additions and 80 deletions

View file

@ -117,7 +117,8 @@
@ cdecl _ftime(ptr) MSVCRT__ftime
@ cdecl -arch=i386 -ret64 _ftol() MSVCRT__ftol
@ cdecl _fullpath(ptr str long) MSVCRT__fullpath
@ cdecl _futime(long ptr)
@ cdecl -arch=win32 _futime(long ptr) _futime32
@ cdecl -arch=win64 _futime(long ptr) _futime64
@ cdecl _gcvt(double long str) MSVCRT__gcvt
@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle
@ cdecl _getch()
@ -318,7 +319,8 @@
@ cdecl _ungetch(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _utime(str ptr)
@ cdecl -arch=win32 _utime(str ptr) _utime32
@ cdecl -arch=win64 _utime(str ptr) _utime64
@ cdecl _vsnprintf(ptr long str ptr)
@ cdecl _vsnwprintf(ptr long wstr ptr) MSVCRT_vsnwprintf
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup

View file

@ -325,7 +325,8 @@
@ cdecl _ftime64(ptr) MSVCRT__ftime64
@ cdecl -arch=i386 -ret64 _ftol() MSVCRT__ftol
@ cdecl _fullpath(ptr str long) MSVCRT__fullpath
@ cdecl _futime(long ptr)
@ cdecl -arch=win32 _futime(long ptr) _futime32
@ cdecl -arch=win64 _futime(long ptr) _futime64
@ cdecl _futime64(long ptr)
@ cdecl _gcvt(double long str) MSVCRT__gcvt
@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle
@ -582,7 +583,8 @@
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)
@ cdecl _utime(str ptr)
@ cdecl -arch=win32 _utime(str ptr) _utime32
@ cdecl -arch=win64 _utime(str ptr) _utime64
@ cdecl _utime64(str ptr)
@ cdecl _vscprintf(str ptr) MSVCRT__vscprintf
@ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf
@ -674,7 +676,8 @@
@ cdecl -ret64 _wtoi64(wstr) MSVCRT__wtoi64
@ cdecl _wtol(wstr) MSVCRT__wtol
@ cdecl _wunlink(wstr) MSVCRT__wunlink
@ cdecl _wutime(wstr ptr)
@ cdecl -arch=win32 _wutime(wstr ptr) _wutime32
@ cdecl -arch=win64 _wutime(wstr ptr) _wutime64
@ cdecl _wutime64(wstr ptr)
@ cdecl _y0(double) MSVCRT__y0
@ cdecl _y1(double) MSVCRT__y1

View file

@ -319,7 +319,8 @@
@ cdecl _ftime64(ptr) MSVCRT__ftime64
@ cdecl -arch=i386 -ret64 _ftol() MSVCRT__ftol
@ cdecl _fullpath(ptr str long) MSVCRT__fullpath
@ cdecl _futime(long ptr)
@ cdecl -arch=win32 _futime(long ptr) _futime32
@ cdecl -arch=win64 _futime(long ptr) _futime64
@ cdecl _futime64(long ptr)
@ cdecl _gcvt(double long str) MSVCRT__gcvt
@ cdecl _get_heap_handle()
@ -578,7 +579,8 @@
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)
@ cdecl _utime(str ptr)
@ cdecl -arch=win32 _utime(str ptr) _utime32
@ cdecl -arch=win64 _utime(str ptr) _utime64
@ cdecl _utime64(str ptr)
@ cdecl _vscprintf(str ptr) MSVCRT__vscprintf
@ cdecl _vscwprintf(wstr ptr) MSVCRT__vscwprintf
@ -670,7 +672,8 @@
@ cdecl -ret64 _wtoi64(wstr) MSVCRT__wtoi64
@ cdecl _wtol(wstr) MSVCRT__wtol
@ cdecl _wunlink(wstr) MSVCRT__wunlink
@ cdecl _wutime(wstr ptr)
@ cdecl -arch=win32 _wutime(wstr ptr) _wutime32
@ cdecl -arch=win64 _wutime(wstr ptr) _wutime64
@ cdecl _wutime64(wstr ptr)
@ cdecl _y0(double) MSVCRT__y0
@ cdecl _y1(double) MSVCRT__y1

View file

@ -30,6 +30,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/utime.h>
#include <limits.h>
#include "windef.h"
@ -1862,7 +1863,7 @@ int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf)
/*********************************************************************
* _futime64 (MSVCRT.@)
*/
int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
int CDECL _futime64(int fd, struct __utimbuf64 *t)
{
ioinfo *info = get_ioinfo(fd);
FILETIME at, wt;
@ -1891,11 +1892,11 @@ int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
/*********************************************************************
* _futime32 (MSVCRT.@)
*/
int CDECL _futime32(int fd, struct MSVCRT___utimbuf32 *t)
int CDECL _futime32(int fd, struct __utimbuf32 *t)
{
if (t)
{
struct MSVCRT___utimbuf64 t64;
struct __utimbuf64 t64;
t64.actime = t->actime;
t64.modtime = t->modtime;
return _futime64( fd, &t64 );
@ -1904,21 +1905,6 @@ int CDECL _futime32(int fd, struct MSVCRT___utimbuf32 *t)
return _futime64( fd, NULL );
}
/*********************************************************************
* _futime (MSVCRT.@)
*/
#ifdef _WIN64
int CDECL _futime(int fd, struct MSVCRT___utimbuf64 *t)
{
return _futime64( fd, t );
}
#else
int CDECL _futime(int fd, struct MSVCRT___utimbuf32 *t)
{
return _futime32( fd, t );
}
#endif
/*********************************************************************
* _get_osfhandle (MSVCRT.@)
*/
@ -3337,7 +3323,7 @@ int CDECL MSVCRT__umask(int umask)
/*********************************************************************
* _utime64 (MSVCRT.@)
*/
int CDECL _utime64(const char* path, struct MSVCRT___utimbuf64 *t)
int CDECL _utime64(const char* path, struct __utimbuf64 *t)
{
int fd = MSVCRT__open(path, MSVCRT__O_WRONLY | MSVCRT__O_BINARY);
@ -3353,11 +3339,11 @@ int CDECL _utime64(const char* path, struct MSVCRT___utimbuf64 *t)
/*********************************************************************
* _utime32 (MSVCRT.@)
*/
int CDECL _utime32(const char* path, struct MSVCRT___utimbuf32 *t)
int CDECL _utime32(const char* path, struct __utimbuf32 *t)
{
if (t)
{
struct MSVCRT___utimbuf64 t64;
struct __utimbuf64 t64;
t64.actime = t->actime;
t64.modtime = t->modtime;
return _utime64( path, &t64 );
@ -3366,25 +3352,10 @@ int CDECL _utime32(const char* path, struct MSVCRT___utimbuf32 *t)
return _utime64( path, NULL );
}
/*********************************************************************
* _utime (MSVCRT.@)
*/
#ifdef _WIN64
int CDECL _utime(const char* path, struct MSVCRT___utimbuf64 *t)
{
return _utime64( path, t );
}
#else
int CDECL _utime(const char* path, struct MSVCRT___utimbuf32 *t)
{
return _utime32( path, t );
}
#endif
/*********************************************************************
* _wutime64 (MSVCRT.@)
*/
int CDECL _wutime64(const wchar_t* path, struct MSVCRT___utimbuf64 *t)
int CDECL _wutime64(const wchar_t* path, struct __utimbuf64 *t)
{
int fd = MSVCRT__wopen(path, MSVCRT__O_WRONLY | MSVCRT__O_BINARY);
@ -3400,11 +3371,11 @@ int CDECL _wutime64(const wchar_t* path, struct MSVCRT___utimbuf64 *t)
/*********************************************************************
* _wutime32 (MSVCRT.@)
*/
int CDECL _wutime32(const wchar_t* path, struct MSVCRT___utimbuf32 *t)
int CDECL _wutime32(const wchar_t* path, struct __utimbuf32 *t)
{
if (t)
{
struct MSVCRT___utimbuf64 t64;
struct __utimbuf64 t64;
t64.actime = t->actime;
t64.modtime = t->modtime;
return _wutime64( path, &t64 );
@ -3413,21 +3384,6 @@ int CDECL _wutime32(const wchar_t* path, struct MSVCRT___utimbuf32 *t)
return _wutime64( path, NULL );
}
/*********************************************************************
* _wutime (MSVCRT.@)
*/
#ifdef _WIN64
int CDECL _wutime(const wchar_t* path, struct MSVCRT___utimbuf64 *t)
{
return _wutime64( path, t );
}
#else
int CDECL _wutime(const wchar_t* path, struct MSVCRT___utimbuf32 *t)
{
return _wutime32( path, t );
}
#endif
/*********************************************************************
* _write (MSVCRT.@)
*/

View file

@ -451,18 +451,6 @@ struct MSVCRT__wfinddata64_t {
wchar_t name[260];
};
struct MSVCRT___utimbuf32
{
__time32_t actime;
__time32_t modtime;
};
struct MSVCRT___utimbuf64
{
__time64_t actime;
__time64_t modtime;
};
struct MSVCRT__stat32 {
_dev_t st_dev;
_ino_t st_ino;

View file

@ -488,7 +488,8 @@
# stub _ftol2_sse_excpt
@ cdecl _fullpath(ptr str long) MSVCRT__fullpath
# stub _fullpath_dbg(ptr str long long str long)
@ cdecl _futime(long ptr)
@ cdecl -arch=win32 _futime(long ptr) _futime32
@ cdecl -arch=win64 _futime(long ptr) _futime64
@ cdecl _futime32(long ptr)
@ cdecl _futime64(long ptr)
@ varargs _fwprintf_l(ptr wstr ptr) MSVCRT__fwprintf_l
@ -1055,7 +1056,8 @@
# stub _vprintf_p(str ptr)
# stub _vprintf_p_l(str ptr ptr)
# stub _vprintf_s_l(str ptr ptr)
@ cdecl _utime(str ptr)
@ cdecl -arch=win32 _utime(str ptr) _utime32
@ cdecl -arch=win64 _utime(str ptr) _utime64
@ cdecl _vscprintf(str ptr) MSVCRT__vscprintf
@ cdecl _vscprintf_l(str ptr ptr) MSVCRT__vscprintf_l
@ cdecl _vscprintf_p_l(str ptr ptr) MSVCRT__vscprintf_p_l
@ -1234,7 +1236,8 @@
@ cdecl _wtol(wstr) MSVCRT__wtol
@ cdecl _wtol_l(wstr ptr) MSVCRT__wtol_l
@ cdecl _wunlink(wstr) MSVCRT__wunlink
@ cdecl _wutime(wstr ptr)
@ cdecl -arch=win32 _wutime(wstr ptr) _wutime32
@ cdecl -arch=win64 _wutime(wstr ptr) _wutime64
@ cdecl _wutime32(wstr ptr)
@ cdecl _wutime64(wstr ptr)
@ cdecl _y0(double) MSVCRT__y0

View file

@ -305,7 +305,8 @@
@ cdecl _ftime(ptr) MSVCRT__ftime
@ cdecl -arch=i386 -ret64 _ftol() MSVCRT__ftol
@ cdecl _fullpath(ptr str long) MSVCRT__fullpath
@ cdecl _futime(long ptr)
@ cdecl -arch=win32 _futime(long ptr) _futime32
@ cdecl -arch=win64 _futime(long ptr) _futime64
@ cdecl _gcvt(double long str) MSVCRT__gcvt
@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle
@ cdecl _get_sbh_threshold()
@ -547,7 +548,8 @@
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)
@ cdecl _utime(str ptr)
@ cdecl -arch=win32 _utime(str ptr) _utime32
@ cdecl -arch=win64 _utime(str ptr) _utime64
@ cdecl _vsnprintf(ptr long str ptr)
@ cdecl _vsnwprintf(ptr long wstr ptr) MSVCRT_vsnwprintf
@ cdecl _waccess(wstr long) MSVCRT__waccess
@ -627,7 +629,8 @@
@ cdecl -ret64 _wtoi64(wstr) MSVCRT__wtoi64
@ cdecl _wtol(wstr) MSVCRT__wtol
@ cdecl _wunlink(wstr) MSVCRT__wunlink
@ cdecl _wutime(wstr ptr)
@ cdecl -arch=win32 _wutime(wstr ptr) _wutime32
@ cdecl -arch=win64 _wutime(wstr ptr) _wutime64
@ cdecl _y0(double) MSVCRT__y0
@ cdecl _y1(double) MSVCRT__y1
@ cdecl _yn(long double) MSVCRT__yn