+2013-05-27 Earnie Boyd <earnie@users.sourceforge.net>
+
+ * types.h (_USE_32BIT_TIME_T): Rework the definitions controlled by
+ _USE_32BIT_TIME_T in light of MSVCRT_VERSION being different with
+ differing OS versions.
+ * time.h (_USE_32BIT_TIME_T): Ditto.
+ * stat.h (_USE_32BIT_TIME_T): Ditto.
+ * wchar.h (_USE_32BIT_TIME_T): Ditto.
+ * _mingw.h (_USE_32BIT_TIME_T): Issue a warning when _USE_32BIT_TIME_T
+ is enabled and MSVCRT_VERSION value does not support it.
+ * msvcrt.def.in: Always define all definitions in light of MSVCRT.DLL
+ being different versions on differing OS.
+ * TODO: Add a note about needing a warning when a function is being
+ used but not defined within the MSVCRT_VERSION value.
+
2013-05-21 Earnie Boyd <earnie@users.sourceforge.net>
* Makefile.in (clean-dist, clean-dist-mingwrt, clean-dist-w32api,
+* Create a warning macro for MSVCRT_VERSION and the use of a declared function
+ when the function does not exist in the MSVCRT_VERSION value.
+
* Review the following headers:
** io.h
** limits.h
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# endif
#endif
+/*
+ * We need to set a default MSVCRT_VERSION which describes the MSVCRT.DLL on
+ * the users system. We are defaulting to XP but we recommend the user define
+ * this in his config.h or Makefile file based on the minimum supported version
+ * of OS for his program.
+ * ME = 600
+ * XP = 710
+ * VISTA = 800
+ * WIN7 = 900
+ * WIN8 = 1010
+ */
+#ifndef MSVCRT_VERSION
+#define MSVCRT_VERSION 710
+#endif
+
+#ifdef _USE_32BIT_TIME_T
+#if MSVCRT_VERSION < 800
+#warning Your MSVCRT_VERSION does not support the use of _USE_32BIT_TIME_T.
+#warning You should define MSVCRT_VERSION based on your MSVCRT.DLL version.
+#warning ME = 600, XP = 710, VISTA = 800, WIN7 = 900 and WIN8 = 1010.
+#endif /* MSVCRT_VERSION < 800 */
+#endif /* _USE_32BIT_TIME_T */
+
struct threadlocalinfostruct;
struct threadmbinfostruct;
typedef struct threadlocalinfostruct *pthreadlocinfo;
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
__time32_t st_ctime; /* Creation time */
};
+#ifndef __STRICT_ANSI__
+struct stat {
+ _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
+ _ino_t st_ino; /* Always zero ? */
+ _mode_t st_mode; /* See above constants */
+ short st_nlink; /* Number of links. */
+ short st_uid; /* User: Maybe significant on NT ? */
+ short st_gid; /* Group: Ditto */
+ _dev_t st_rdev; /* Seems useless (not even filled in) */
+ _off_t st_size; /* File size in bytes */
+ time_t st_atime; /* Accessed date (always 00:00 hrs local
+ * on FAT) */
+ time_t st_mtime; /* Modified time */
+ time_t st_ctime; /* Creation time */
+};
+#endif /* __STRICT_ANSI__ */
+
struct _stat64 {
- dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- ino_t st_ino; /* Always zero ? */
- mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- dev_t st_rdev; /* Seems useless (not even filled in) */
- __int64 st_size; /* File size in bytes */
+ dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
+ ino_t st_ino; /* Always zero ? */
+ mode_t st_mode; /* See above constants */
+ short st_nlink; /* Number of links. */
+ short st_uid; /* User: Maybe significant on NT ? */
+ short st_gid; /* Group: Ditto */
+ dev_t st_rdev; /* Seems useless (not even filled in) */
+ _off64_t st_size; /* File size in bytes */
__time64_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
__time64_t st_mtime; /* Modified time */
__time64_t st_ctime; /* Creation time */
};
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- _mode_t st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
short st_uid;
short st_gid;
_dev_t st_rdev;
- __int64 st_size;
+ _off64_t st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
+
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
short st_uid;
short st_gid;
_dev_t st_rdev;
- __int32 st_size;
+ _off_t st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#define __stat64 _stat64
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
#define _fstat _fstat32
#define _fstati64 _fstat32i64
#define _stat _stat32
#endif
#if !defined(_NO_OLDNAMES) && !defined(__STRICT_ANSI__)
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
-#define stat(a,b) _stat32(a,b)
-#define fstat(a,b) _fstat32(a,b)
-#else
-#define stat(a,b) _stat64i32(a,b)
-#define fstat(a,b) _fstat64i32(a,b)
-#endif
#define stat _stat
#define fstat _fstat
#endif /* !defined(_NO_OLDNAMES) && !defined(__STRICT_ANSI__) */
#define _wstat64i32 _wstat64
#endif
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
#define _wstat _wstat32
#define _wstati64 _wstat32i64
#else /* !_USE_32BIT_TIME_T */
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*);
#endif /* Not _NO_OLDNAMES */
-/* This requires newer versions of msvcrt.dll (6.10 or higher). */
+/* This requires newer versions of msvcrt.dll (6.10 or higher). */
struct __timeb64
{
__time64_t time;
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime32 (struct __timeb32*);
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime32 ((struct __timeb32*)_v)); }
#else
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#ifndef _TIME_T_DEFINED
/* FIXME __STRICT_ANSI__ ! */
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
typedef __time32_t time_t;
#else
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
+#ifndef __STRICT_ANSI__
typedef _off_t off_t;
+#endif /* __STRICT_ANSI__ */
#endif /* Not _OFF_T_ */
+#ifndef _OFF64_T_
+#define _OFF64_T_
+typedef __int64 _off64_t;
+#ifndef __STRICT_ANSI__
+typedef __int64 off64_t;
+#endif /* __STRICT_ANSI__ */
+#endif /* ndef _OFF64_T */
#ifndef _DEV_T_
#define _DEV_T_
#ifndef _NO_OLDNAMES
typedef _ssize_t ssize_t;
#endif
-#endif /* Not _SSIZE_T_ */
+#endif /* Not _SSIZE_T_ */
#ifndef _FPOS64_T_
#define _FPOS64_T_
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#endif
#ifndef _TIME_T_DEFINED
-# if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+# if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
typedef __time32_t time_t;
# else
typedef __time64_t time_t;
_CRTIMP char* __cdecl __MINGW_NOTHROW _strdate(char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strtime(char*);
-/* These require newer versions of msvcrt.dll (6.10 or higher). */
+/* These require newer versions of msvcrt.dll (6.10 or higher). */
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _time64( __time64_t*);
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mktime64 (struct tm*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime64 (const __time64_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime64 (const __time64_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime64 (const __time64_t*);
-/* These require newer versions of msvcrt.dll (8.00 or higher). */
-_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _time32 (__time32_t*);
+/* These require newer versions of msvcrt.dll (8.00 or higher). */
+#ifdef MSVCRT_VERSION >= 800
+_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _time32 (__time32_t*);
_CRTIMP double __cdecl __MINGW_NOTHROW _difftime32 (__time32_t, __time32_t);
_CRTIMP double __cdecl __MINGW_NOTHROW _difftime64 (__time64_t, __time64_t);
-_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _mktime32 (struct tm*);
+_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _mktime32 (struct tm*);
_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _mkgmtime32 (struct tm*);
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mkgmtime64 (struct tm*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime32 (const __time32_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime32 (const __time32_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime32 (const __time32_t*);
-
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v) { return(_time32 (_v)); }
-_CRTALIAS double __cdecl __MINGW_NOTHROW difftime (time_t _v1, time_t _v2) { return(_difftime32 (_v1,_v2)); }
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v) { return(_mktime32 (_v)); }
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v) { return(_mkgmtime32 (_v)); }
-_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v) { return(_ctime32 (_v)); }
-_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v) { return(_gmtime32 (_v)); }
-_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v) { return(_localtime32 (_v)); }
+_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime32 (const __time32_t*);
+_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime32 (const __time32_t*);
+_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime32(const __time32_t*);
+
+#if defined(_USE_32BIT_TIME_T)
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v)
+ { return(_time32 (_v)); }
+_CRTALIAS double __cdecl __MINGW_NOTHROW difftime(time_t _v1, time_t _v2)
+ { return(_difftime32 (_v1,_v2)); }
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v)
+ { return(_mktime32 (_v)); }
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v)
+ { return(_mkgmtime32 (_v)); }
+_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v)
+ { return(_ctime32 (_v)); }
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v)
+ { return(_gmtime32 (_v)); }
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v)
+ { return(_localtime32 (_v)); }
+
#else
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v) { return(_time64 (_v)); }
-_CRTALIAS double __cdecl __MINGW_NOTHROW difftime (time_t _v1, time_t _v2) { return(_difftime64 (_v1,_v2)); }
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v) { return(_mktime64 (_v)); }
-_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v) { return(_mkgmtime64 (_v)); }
-_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v) { return(_ctime64 (_v)); }
-_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v) { return(_gmtime64 (_v)); }
-_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v) { return(_localtime64 (_v)); }
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v)
+ { return(_time64 (_v)); }
+_CRTALIAS double __cdecl __MINGW_NOTHROW difftime(time_t _v1, time_t _v2)
+ { return(_difftime64 (_v1,_v2)); }
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v)
+ { return(_mktime64 (_v)); }
+_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v)
+ { return(_mkgmtime64 (_v)); }
+_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v)
+ { return(_ctime64 (_v)); }
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v)
+ { return(_gmtime64 (_v)); }
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v)
+ { return(_localtime64 (_v)); }
#endif /* _USE_32BIT_TIME_T */
+#else /* MSVCRT_VERSION < 800 */
+_CRTIMP time_t __cdecl __MINGW32_NOTHROW time (time_t*);
+_CRTIMP double __cdecl __MINGW32_NOTHROW difftime (time_t, time_t);
+_CRTIMP time_t __cdecl __MINGW32_NOTHROW mktime (struct tm*);
+_CRTIMP char* __cdecl __MINGW32_NOTRHOW ctime (const time_t*);
+_CRTIMP struct tm* __cdecl __MINGW32_NOTHROW gmtime (const time_t*);
+_CRTIMP struct tm* __cdecl __MINGW32_NOTHROW localtime (const time_t*);
+#endif /* MSVCRT_VERSION >= 800 */
+
/*
* _daylight: non zero if daylight savings time is used.
* _timezone: difference in seconds between GMT and local time.
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate(wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime(wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
+#ifdef MSVCRT_VERSION >= 800
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
+#endif
-#ifndef _USE_32BIT_TIME_T
-_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
-#else
+#ifdef _USE_32BIT_TIME_T && MSVCRT_VERSION >= 800
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
+#else
+_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
#endif
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED
-#endif /* _WTIME_DEFINED */
+#endif /* _WTIME_DEFINED */
#ifdef __cplusplus
}
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* not.
*/
#include <wctype.h>
-
-#ifndef __STRICT_ANSI__
-/* This is necessary to support the the non-ANSI wchar declarations
- here. */
#include <sys/types.h>
-#endif /* __STRICT_ANSI__ */
#define WCHAR_MIN 0
#define WCHAR_MAX 0xffff
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
#else
_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*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_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*);
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct __wfinddata32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32 (long, struct __wfinddata32_t*);
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
__time32_t st_ctime; /* Creation time */
};
+#ifndef __STRICT_ANSI__
+struct stat {
+ _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
+ _ino_t st_ino; /* Always zero ? */
+ _mode_t st_mode; /* See above constants */
+ short st_nlink; /* Number of links. */
+ short st_uid; /* User: Maybe significant on NT ? */
+ short st_gid; /* Group: Ditto */
+ _dev_t st_rdev; /* Seems useless (not even filled in) */
+ _off_t st_size; /* File size in bytes */
+ time_t st_atime; /* Accessed date (always 00:00 hrs local
+ * on FAT) */
+ time_t st_mtime; /* Modified time */
+ time_t st_ctime; /* Creation time */
+} ;
+#endif /* __STRICT_ANSI__ */
+
struct _stat64 {
dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
ino_t st_ino; /* Always zero ? */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
dev_t st_rdev; /* Seems useless (not even filled in) */
- __int64 st_size; /* File size in bytes */
+ _off64_t st_size; /* File size in bytes */
__time64_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
__time64_t st_mtime; /* Modified time */
__time64_t st_ctime; /* Creation time */
};
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- _mode_t st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
short st_uid;
short st_gid;
_dev_t st_rdev;
- __int64 st_size;
+ _off64_t st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
-};
+} ;
+
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
short st_uid;
short st_gid;
_dev_t st_rdev;
- __int32 st_size;
+ _off_t st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#define __stat64 _stat64
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
#define _fstat _fstat32
#define _fstati64 _fstat32i64
#define _stat _stat32
#define _wstat64i32 _wstat64
#endif
-#if defined(_USE_32BIT_TIME_T) && defined(_HAVE_32BIT_TIME_T)
+#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
#define _wstat _wstat32
#define _wstati64 _wstat32i64
#else
;
-; __FILENAME__
+; __FILENAME__
; created from msvcrt.def.in
;* This file has no copyright assigned and is placed in the Public Domain.
;* This file is a part of the mingw-runtime package.
_cputs
_creat
_cscanf
-#if !(__msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || msvcr90d__ || __msvcr100__ || __msvcr100d__)
_ctype DATA
-#endif
_cwait
_daylight DATA
_dstbias DATA
_filelengthi64
_fileno
_findclose
-#if __MSVCRT_VERSION__ < 0x0800
_findfirst
_findfirsti64
_findnext
_findnexti64
-#endif
_finite
_flsbuf
_flushall
_fputchar
_fputwchar
_fsopen
-#if __MSVCRT_VERSION__ < 0x0800
_fstat
_fstati64
_ftime
-#endif
_ftol
_fullpath
-#if __MSVCRT_VERSION__ < 0x0800
_futime
-#endif
_gcvt
_get_osfhandle
_get_sbh_threshold
_spawnvp
_spawnvpe
_splitpath
-#if __MSVCRT_VERSION__ < 0x0800
_stat
_stati64
-#endif
_statusfp
_strcmpi
_strdate
_unlink
_unloaddll
_unlock
-#if __MSVCRT_VERSION__ < 0x0800
_utime
-#endif
_vsnprintf
_vsnwprintf
_waccess
_wcsrev
_wcsset
_wcsupr
-#if __MSVCRT_VERSION__ < 0x0800
_wctime
-#endif
_wenviron DATA
_wexecl
_wexecle
_wexecvp
_wexecvpe
_wfdopen
-#if __MSVCRT_VERSION__ < 0x0800
_wfindfirst
_wfindfirsti64
_wfindnext
_wfindnexti64
-#endif
_wfopen
_wfreopen
_wfsopen
_wspawnvp
_wspawnvpe
_wsplitpath
-#if __MSVCRT_VERSION__ < 0x0800
_wstat
_wstati64
-#endif
_wstrdate
_wstrtime
_wsystem
_wtoi64
_wtol
_wunlink
-#if __MSVCRT_VERSION__ < 0x0800
_wutime
-#endif
_y0
_y1
_yn
clock
cos
cosh
-#if __MSVCRT_VERSION__ < 0x0800
ctime
difftime
-#endif
div
exit
exp
gets
getwc
getwchar
-#if __MSVCRT_VERSION__ < 0x0800
gmtime
-#endif
is_wctype
isalnum
isalpha
ldexp
ldiv
localeconv
-#if __MSVCRT_VERSION__ < 0x0800
localtime
-#endif
log
log10
longjmp
memcpy
memmove
memset
-#if __MSVCRT_VERSION__ < 0x0800
mktime
-#endif
modf
perror
pow
system
tan
tanh
-#if __MSVCRT_VERSION__ < 0x0800
time
-#endif
tmpfile
tmpnam
tolower
_wctype
_wtof
_get_heap_handle
-#if ( __msvcr70__ || __msvcr70d__ || __msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__ || __msvcr100__ || __msvcr100d__)
; msvcr70.dll and later
__buffer_overrun
__lc_clike
__set_buffer_overrun_handler
_CRT_RTC_INIT
_set_security_error_handler
-#endif /* 7.0 */
-#if (__msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__ || __msvcr100__ || __msvcr100d__)
; msvcr71.dll
__CppXcptFilter
__CxxCallUnwindVecDtor
_set_purecall_handler
-#endif /* 7.1 */
-#if ( __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__ || __msvcr100__ || __msvcr100d__)
; msvcr80.dll
_get_output_format
_set_output_format
_wstat32i64
_wstat64i32
_wutime32
-#endif