#endif
/* CRT stuff */
-#if 1
-#if defined (_DLL) && defined (_M_IX86)
+#if defined(_M_CEE_PURE)
/* Retained for compatibility with VC++ 5.0 and earlier versions */
_CRTIMP unsigned char * __cdecl __p__mbctype(void);
_CRTIMP unsigned char * __cdecl __p__mbcasemap(void);
-#endif /* defined (_DLL) && defined (_M_IX86) */
-#endif
-#ifndef _mbctype
-#ifdef _MSVCRT_
- extern unsigned char _mbctype[257];
+ #define _mbctype (__p__mbctype())
+ #define _mbcasemap (__p__mbcasemap())
#else
-#define _mbctype (*_imp___mbctype)
- extern unsigned char **_imp___mbctype;
-#endif
-#endif
-#ifndef _mbcasemap
-#ifdef _MSVCRT_
- extern unsigned char *_mbcasemap;
-#else
-#define _mbcasemap (*_imp___mbcasemap)
- extern unsigned char **_imp___mbcasemap;
-#endif
-#endif
+ _CRTIMP extern unsigned char _mbctype[];
+ _CRTIMP extern unsigned char _mbcasemap[];
+#endif // defined(_M_CEE_PURE)
/* CRT stuff */
#if 1
extern "C" {
#endif
+ _CRTIMP errno_t __cdecl asctime_s(char *_Buf,size_t _SizeInWords,const struct tm *_Tm);
_CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time);
#include <vadefs.h>
#endif
-#ifdef _CRT_NON_CONFORMING_SWPRINTFS
-#ifndef __cplusplus
-#define swprintf _swprintf
-#define vswprintf _vswprintf
-#define _swprintf_l __swprintf_l
-#define _vswprintf_l __vswprintf_l
-#endif
-#endif
+//#ifdef _CRT_NON_CONFORMING_SWPRINTFS
+//#ifndef __cplusplus
+//#define swprintf _swprintf
+//#define vswprintf _vswprintf
+//#define _swprintf_l __swprintf_l
+//#define _vswprintf_l __vswprintf_l
+//#endif
+//#endif
_CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
_CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
#endif
-#if 0
+// Do it like this to keep compatibility to MSVC while using msvcrt.dll
#ifndef RC_INVOKED
-#ifdef _USE_32BIT_TIME_T
-__CRT_INLINE int __cdecl _utime32(const char *_Filename,struct _utimbuf *_Utimbuf) {
- return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
-}
-__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
- return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
-}
-__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
- return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
-}
-#else
-__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
- return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
-}
-__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
- return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
-}
-__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
- return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
-}
-#endif
-#endif
-#endif
+ #ifdef _USE_32BIT_TIME_T
+ __CRT_INLINE int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Utimbuf) {
+ return _utime(_Filename,(struct __timbuf *)_Utimbuf);
+ }
+ __CRT_INLINE int __cdecl _futime32(int _Desc,struct __utimbuf32 *_Utimbuf) {
+ return _futime(_Desc,(struct _utimbuf *)_Utimbuf);
+ }
+ __CRT_INLINE int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Utimbuf) {
+ return _wutime(_Filename,(struct _utimbuf *)_Utimbuf);
+ }
+ #else // !_USE_32BIT_TIME_T
+ #ifndef _WIN64
+ __CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
+ return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
+ }
+ __CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
+ return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
+ }
+ __CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
+ return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
+ }
+ #endif
+ #endif // _USE_32BIT_TIME_T
+#endif // RC_INVOKED
#ifndef NO_OLDNAMES
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
#define _tcsftime wcsftime
#define _tcsftime_l _wcsftime_l
+#define _tasctime_s _wasctime_s
+#define _tctime_s _wctime_s
+#define _tctime32_s _wctime32_s
+#define _tctime64_s _wctime64_s
+#define _tstrdate_s _wstrdate_s
+#define _tstrtime_s _wstrtime_s
+
#define _tchdir _wchdir
#define _tgetcwd _wgetcwd
#define _tgetdcwd _wgetdcwd
#define _tcsftime strftime
#define _tcsftime_l _strftime_l
+#define _tasctime_s asctime_s
+#define _tctime_s ctime_s
+#define _tctime32_s _ctime32_s
+#define _tctime64_s _ctime64_s
+#define _tstrdate_s _strdate_s
+#define _tstrtime_s _strtime_s
+
#define _tchdir _chdir
#define _tgetcwd _getcwd
#define _tgetdcwd _getdcwd