Commit 8a2dc3aa authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use _finddata_t definition from public header.

parent 713364f3
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <corecrt_io.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <direct.h> #include <direct.h>
...@@ -44,8 +45,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); ...@@ -44,8 +45,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
#undef _wfindnext64i32 #undef _wfindnext64i32
#undef _wfindnext64 #undef _wfindnext64
#undef _findfirst
#undef _findfirsti64
#undef _findnext
#undef _findnexti64
#undef _findfirst32
#undef _findnext32
#undef _findfirst64i32
#undef _findfirst64
#undef _findnext64i32
#undef _findnext64
/* INTERNAL: Translate WIN32_FIND_DATAA to finddata_t */ /* INTERNAL: Translate WIN32_FIND_DATAA to finddata_t */
static void msvcrt_fttofd( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata_t* ft) static void msvcrt_fttofd( const WIN32_FIND_DATAA *fd, struct _finddata_t* ft)
{ {
DWORD dw; DWORD dw;
...@@ -65,7 +77,7 @@ static void msvcrt_fttofd( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata_t ...@@ -65,7 +77,7 @@ static void msvcrt_fttofd( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata_t
} }
/* INTERNAL: Translate WIN32_FIND_DATAA to finddata32_t */ /* INTERNAL: Translate WIN32_FIND_DATAA to finddata32_t */
static void msvcrt_fttofd32( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata32_t* ft) static void msvcrt_fttofd32( const WIN32_FIND_DATAA *fd, struct _finddata32_t* ft)
{ {
DWORD dw; DWORD dw;
...@@ -125,7 +137,7 @@ static void msvcrt_wfttofd32(const WIN32_FIND_DATAW *fd, struct _wfinddata32_t* ...@@ -125,7 +137,7 @@ static void msvcrt_wfttofd32(const WIN32_FIND_DATAW *fd, struct _wfinddata32_t*
} }
/* INTERNAL: Translate WIN32_FIND_DATAA to finddatai64_t */ /* INTERNAL: Translate WIN32_FIND_DATAA to finddatai64_t */
static void msvcrt_fttofdi64( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddatai64_t* ft) static void msvcrt_fttofdi64( const WIN32_FIND_DATAA *fd, struct _finddatai64_t* ft)
{ {
DWORD dw; DWORD dw;
...@@ -145,7 +157,7 @@ static void msvcrt_fttofdi64( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddat ...@@ -145,7 +157,7 @@ static void msvcrt_fttofdi64( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddat
} }
/* INTERNAL: Translate WIN32_FIND_DATAA to finddata64_t */ /* INTERNAL: Translate WIN32_FIND_DATAA to finddata64_t */
static void msvcrt_fttofd64( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata64_t* ft) static void msvcrt_fttofd64( const WIN32_FIND_DATAA *fd, struct _finddata64_t* ft)
{ {
DWORD dw; DWORD dw;
...@@ -185,7 +197,7 @@ static void msvcrt_wfttofd64( const WIN32_FIND_DATAW *fd, struct _wfinddata64_t* ...@@ -185,7 +197,7 @@ static void msvcrt_wfttofd64( const WIN32_FIND_DATAW *fd, struct _wfinddata64_t*
} }
/* INTERNAL: Translate WIN32_FIND_DATAA to finddata64i32_t */ /* INTERNAL: Translate WIN32_FIND_DATAA to finddata64i32_t */
static void msvcrt_fttofd64i32( const WIN32_FIND_DATAA *fd, struct MSVCRT__finddata64i32_t* ft) static void msvcrt_fttofd64i32( const WIN32_FIND_DATAA *fd, struct _finddata64i32_t* ft)
{ {
DWORD dw; DWORD dw;
...@@ -357,7 +369,7 @@ int CDECL _findclose(intptr_t hand) ...@@ -357,7 +369,7 @@ int CDECL _findclose(intptr_t hand)
* NOTES * NOTES
* See FindFirstFileA. * See FindFirstFileA.
*/ */
intptr_t CDECL _findfirst(const char * fspec, struct MSVCRT__finddata_t* ft) intptr_t CDECL _findfirst(const char * fspec, struct _finddata_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -376,7 +388,7 @@ intptr_t CDECL _findfirst(const char * fspec, struct MSVCRT__finddata_t* ft) ...@@ -376,7 +388,7 @@ intptr_t CDECL _findfirst(const char * fspec, struct MSVCRT__finddata_t* ft)
/********************************************************************* /*********************************************************************
* _findfirst32 (MSVCRT.@) * _findfirst32 (MSVCRT.@)
*/ */
intptr_t CDECL _findfirst32(const char * fspec, struct MSVCRT__finddata32_t* ft) intptr_t CDECL _findfirst32(const char * fspec, struct _finddata32_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -439,7 +451,7 @@ intptr_t CDECL _wfindfirst32(const wchar_t * fspec, struct _wfinddata32_t* ft) ...@@ -439,7 +451,7 @@ intptr_t CDECL _wfindfirst32(const wchar_t * fspec, struct _wfinddata32_t* ft)
* *
* 64-bit version of _findfirst. * 64-bit version of _findfirst.
*/ */
intptr_t CDECL _findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* ft) intptr_t CDECL _findfirsti64(const char * fspec, struct _finddatai64_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -460,7 +472,7 @@ intptr_t CDECL _findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* f ...@@ -460,7 +472,7 @@ intptr_t CDECL _findfirsti64(const char * fspec, struct MSVCRT__finddatai64_t* f
* *
* 64-bit version of _findfirst. * 64-bit version of _findfirst.
*/ */
intptr_t CDECL _findfirst64(const char * fspec, struct MSVCRT__finddata64_t* ft) intptr_t CDECL _findfirst64(const char * fspec, struct _finddata64_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -502,7 +514,7 @@ intptr_t CDECL _wfindfirst64(const wchar_t * fspec, struct _wfinddata64_t* ft) ...@@ -502,7 +514,7 @@ intptr_t CDECL _wfindfirst64(const wchar_t * fspec, struct _wfinddata64_t* ft)
* *
* 64-bit/32-bit version of _findfirst. * 64-bit/32-bit version of _findfirst.
*/ */
intptr_t CDECL _findfirst64i32(const char * fspec, struct MSVCRT__finddata64i32_t* ft) intptr_t CDECL _findfirst64i32(const char * fspec, struct _finddata64i32_t* ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
HANDLE hfind; HANDLE hfind;
...@@ -576,7 +588,7 @@ intptr_t CDECL _wfindfirsti64(const wchar_t * fspec, struct _wfinddatai64_t* ft) ...@@ -576,7 +588,7 @@ intptr_t CDECL _wfindfirsti64(const wchar_t * fspec, struct _wfinddatai64_t* ft)
* NOTES * NOTES
* See FindNextFileA. * See FindNextFileA.
*/ */
int CDECL _findnext(intptr_t hand, struct MSVCRT__finddata_t * ft) int CDECL _findnext(intptr_t hand, struct _finddata_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -593,7 +605,7 @@ int CDECL _findnext(intptr_t hand, struct MSVCRT__finddata_t * ft) ...@@ -593,7 +605,7 @@ int CDECL _findnext(intptr_t hand, struct MSVCRT__finddata_t * ft)
/********************************************************************* /*********************************************************************
* _findnext32 (MSVCRT.@) * _findnext32 (MSVCRT.@)
*/ */
int CDECL _findnext32(intptr_t hand, struct MSVCRT__finddata32_t * ft) int CDECL _findnext32(intptr_t hand, struct _finddata32_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -648,7 +660,7 @@ int CDECL _wfindnext(intptr_t hand, struct _wfinddata_t * ft) ...@@ -648,7 +660,7 @@ int CDECL _wfindnext(intptr_t hand, struct _wfinddata_t * ft)
* *
* 64-bit version of _findnext. * 64-bit version of _findnext.
*/ */
int CDECL _findnexti64(intptr_t hand, struct MSVCRT__finddatai64_t * ft) int CDECL _findnexti64(intptr_t hand, struct _finddatai64_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -667,7 +679,7 @@ int CDECL _findnexti64(intptr_t hand, struct MSVCRT__finddatai64_t * ft) ...@@ -667,7 +679,7 @@ int CDECL _findnexti64(intptr_t hand, struct MSVCRT__finddatai64_t * ft)
* *
* 64-bit version of _findnext. * 64-bit version of _findnext.
*/ */
int CDECL _findnext64(intptr_t hand, struct MSVCRT__finddata64_t * ft) int CDECL _findnext64(intptr_t hand, struct _finddata64_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
...@@ -705,7 +717,7 @@ int CDECL _wfindnext64(intptr_t hand, struct _wfinddata64_t * ft) ...@@ -705,7 +717,7 @@ int CDECL _wfindnext64(intptr_t hand, struct _wfinddata64_t * ft)
* *
* 64-bit/32-bit version of _findnext. * 64-bit/32-bit version of _findnext.
*/ */
int CDECL _findnext64i32(intptr_t hand, struct MSVCRT__finddata64i32_t * ft) int CDECL _findnext64i32(intptr_t hand, struct _finddata64i32_t * ft)
{ {
WIN32_FIND_DATAA find_data; WIN32_FIND_DATAA find_data;
......
...@@ -283,78 +283,6 @@ extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN; ...@@ -283,78 +283,6 @@ extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
extern FILE MSVCRT__iob[]; extern FILE MSVCRT__iob[];
struct MSVCRT__finddata32_t {
unsigned int attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
_fsize_t size;
char name[260];
};
struct MSVCRT__finddata32i64_t {
unsigned int attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
char name[260];
};
struct MSVCRT__finddata64i32_t {
unsigned int attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
_fsize_t size;
char name[260];
};
struct MSVCRT__finddata64_t {
unsigned int attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
char name[260];
};
struct MSVCRT__wfinddata32_t {
unsigned int attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
_fsize_t size;
wchar_t name[260];
};
struct MSVCRT__wfinddata32i64_t {
unsigned int attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
wchar_t name[260];
};
struct MSVCRT__wfinddata64i32_t {
unsigned int attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
_fsize_t size;
wchar_t name[260];
};
struct MSVCRT__wfinddata64_t {
unsigned int attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
wchar_t name[260];
};
struct MSVCRT__stat32 { struct MSVCRT__stat32 {
_dev_t st_dev; _dev_t st_dev;
_ino_t st_ino; _ino_t st_ino;
...@@ -411,22 +339,6 @@ struct MSVCRT__stat64 { ...@@ -411,22 +339,6 @@ struct MSVCRT__stat64 {
__time64_t st_ctime; __time64_t st_ctime;
}; };
#ifdef _WIN64
#define MSVCRT__finddata_t MSVCRT__finddata64i32_t
#define MSVCRT__finddatai64_t MSVCRT__finddata64_t
#define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t
#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t
#define MSVCRT__stat MSVCRT__stat64i32
#define MSVCRT__stati64 MSVCRT__stat64
#else
#define MSVCRT__finddata_t MSVCRT__finddata32_t
#define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t
#define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t
#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t
#define MSVCRT__stat MSVCRT__stat32
#define MSVCRT__stati64 MSVCRT__stat32i64
#endif
#define MSVCRT_RAND_MAX 0x7fff #define MSVCRT_RAND_MAX 0x7fff
#define MSVCRT_NO_CONSOLE_FD (-2) #define MSVCRT_NO_CONSOLE_FD (-2)
......
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