int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*);
int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*);
-#ifndef __NO_INLINE__
#include <string.h>
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _filename, struct _wfinddata32i64_t* _fdata) {
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _filename, struct _wfinddata32i64_t* _fdata) {
struct _wfinddata64_t fd;
intptr_t ret = _wfindfirst64(_filename, &fd);
if (ret == -1) {
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* _filename, struct _wfinddata64i32_t* _fdata) {
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* _filename, struct _wfinddata64i32_t* _fdata) {
struct _wfinddata32_t fd;
intptr_t ret = _wfindfirst32(_filename, &fd);
if (ret == -1) {
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) {
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) {
struct _wfinddata64_t fd;
int ret = _wfindnext64(_fp,&fd);
if (ret == -1) {
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, struct _wfinddata64i32_t* _fdata) {
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, struct _wfinddata64i32_t* _fdata) {
struct _wfinddata32_t fd;
int ret = _wfindnext32(_fp, &fd);
if (ret == -1) {
return ret;
}
-#else /* def __NO_INLINE__ */
-#define _findfirst64i32 _findfirst64
-#define _finddata64i32_t __finddata64_t
-#define _findfirst32i64 _findfirst32
-#define _finddata32i64_t _finddata32_t
-#define _findnext64i32 _findnext64
-#define _findnext32i64 _findnext32
-
-#define _wfindfirst64i32 _wfindfirst64
-#define _wfindnext64i32 _wfindnext64
-#define _wfinddata64i32_t _wfinddata64_t
-#define _wfindfirst32i64 _wfindfirst32
-#define _wfindnext32i64 _wfindnext32
-#define _wfinddata32i64_t _wfinddata32_t
-#endif /* ndef __NO_INLINE__ */
-
#endif /* _WIO_DEFINED */
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata32_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32i64 (long, struct _wfinddata32i64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64i32 (long, struct _wfinddata64i32_t*);
+intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
+intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (intptr_t, struct _wfinddata32_t*);
+int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*);
+int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct _wfinddata64_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct _wfinddata64_t*);
/* _wfindfirst32 and _wfindnext32 do not exist in MSVCRT.DLL */
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t* _v1, struct _wfinddata32_t* _v2) {
- _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata32_t*);
return _wfindfirst(_v1, _v2);
}
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext32 (intptr_t _v1, struct _wfinddata32_t* _v2) {
- _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (intptr_t, struct _wfinddata32_t*);
return _wfindnext(_v1, _v2);
}
+#include <string.h>
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _filename, struct _wfinddata32i64_t* _fdata) {
+ struct _wfinddata64_t fd;
+ intptr_t ret = _wfindfirst64(_filename, &fd);
+ if (ret == -1) {
+ memset(_fdata, 0, sizeof(struct _wfinddata64_t));
+ return ret;
+ }
+ _fdata->attrib = fd.attrib;
+ _fdata->time_create = (__time32_t)fd.time_create;
+ _fdata->time_access = (__time32_t)fd.time_access;
+ _fdata->time_write = (__time32_t)fd.time_write;
+ _fdata->size = fd.size;
+ wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+ return ret;
+}
+
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* _filename, struct _wfinddata64i32_t* _fdata) {
+ struct _wfinddata32_t fd;
+ intptr_t ret = _wfindfirst32(_filename, &fd);
+ if (ret == -1) {
+ memset(_fdata, 0, sizeof(struct _wfinddata32_t));
+ return ret;
+ }
+ _fdata->attrib = fd.attrib;
+ _fdata->time_create = (__time64_t)fd.time_create;
+ _fdata->time_access = (__time64_t)fd.time_access;
+ _fdata->time_write = (__time64_t)fd.time_write;
+ _fdata->size = fd.size;
+ wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+ return ret;
+}
+
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) {
+ struct _wfinddata64_t fd;
+ int ret = _wfindnext64(_fp,&fd);
+ if (ret == -1) {
+ memset(_fdata, 0, sizeof(struct _wfinddata32i64_t));
+ return ret;
+ }
+ _fdata->attrib = fd.attrib;
+ _fdata->time_create = (__time32_t)fd.time_create;
+ _fdata->time_access = (__time32_t)fd.time_access;
+ _fdata->time_write = (__time32_t)fd.time_write;
+ _fdata->size = fd.size;
+ wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+ return ret;
+}
+
+__CRT_MAYBE_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, struct _wfinddata64i32_t* _fdata) {
+ struct _wfinddata32_t fd;
+ int ret = _wfindnext32(_fp, &fd);
+ if (ret == -1) {
+ memset(_fdata, 0, sizeof(struct _wfinddata64i32_t));
+ return ret;
+ }
+ _fdata->attrib = fd.attrib;
+ _fdata->time_create = (__time64_t)fd.time_create;
+ _fdata->time_access = (__time64_t)fd.time_access;
+ _fdata->time_write = (__time64_t)fd.time_write;
+ _fdata->size = fd.size;
+ wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+ return ret;
+}
+
#if defined(_USE_32BIT_TIME_T)
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t