--- mstools/h/time.h 2018/08/09 18:21:05 1.1.1.3 +++ mstools/h/time.h 2018/08/09 18:22:58 1.1.1.4 @@ -1,7 +1,7 @@ /*** *time.h - definitions/declarations for time routines * -* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved. * *Purpose: * This file has declarations of time routines and defines @@ -30,15 +30,6 @@ extern "C" { #define _CRTAPI1 __cdecl #define _CRTAPI2 __cdecl -#elif ( _MSC_VER == 600 ) - -/* - * Definitions for old MS C6-386 compiler - */ -#define _CRTAPI1 _cdecl -#define _CRTAPI2 _cdecl -#define _M_IX86 300 - #else /* @@ -132,12 +123,7 @@ extern long _timezone; /* standard/daylight savings time zone names */ #ifdef _POSIX_ -#include -#ifndef TZNAME_MAX -#define TZNAME_MAX 10 -#endif -#define tzname _tzname -extern char _tzname[2][TZNAME_MAX + 1]; +extern char * tzname[2]; #else extern char * _tzname[2]; #endif @@ -165,6 +151,22 @@ void _CRTAPI1 _tzset(void); unsigned _CRTAPI1 _getsystime(struct tm *); unsigned _CRTAPI1 _setsystime(struct tm *, unsigned); +#if !__STDC__ +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _WTIME_DEFINED +size_t _CRTAPI1 wcsftime(wchar_t *, size_t, const char *, const struct tm *); +#define _WTIME_DEFINED +#endif +#endif /* __STDC__ */ #if !__STDC__ || defined(_POSIX_) /* Non-ANSI names for compatibility */ @@ -172,10 +174,13 @@ unsigned _CRTAPI1 _setsystime(struct tm #define CLK_TCK CLOCKS_PER_SEC #define daylight _daylight -#define timezone _timezone +/* timezone cannot be #defined to _timezone because of */ + +#ifndef _POSIX_ #define tzname _tzname #define tzset _tzset +#endif /* _POSIX_ */ #endif /* __STDC__ */