--- mstools/h/time.h 2018/08/09 18:20:28 1.1.1.2 +++ 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 @@ -18,10 +18,26 @@ extern "C" { #endif -#ifndef MIPS -#if (_MSC_VER <= 600) -#define __cdecl _cdecl -#endif +/* + * Conditional macro definition for function calling type and variable type + * qualifiers. + */ +#if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) ) + +/* + * Definitions for MS C8-32 (386/486) compiler + */ +#define _CRTAPI1 __cdecl +#define _CRTAPI2 __cdecl + +#else + +/* + * Other compilers (e.g., MIPS) + */ +#define _CRTAPI1 +#define _CRTAPI2 + #endif /* define the implementation defined time type */ @@ -107,33 +123,50 @@ extern long _timezone; /* standard/daylight savings time zone names */ #ifdef _POSIX_ -#define tzname _tzname -#endif +extern char * tzname[2]; +#else extern char * _tzname[2]; +#endif #endif /* function prototypes */ -char * asctime(const struct tm *); -char * ctime(const time_t *); -clock_t clock(void); -double difftime(time_t, time_t); -struct tm * gmtime(const time_t *); -struct tm * localtime(const time_t *); -time_t mktime(struct tm *); -size_t strftime(char *, size_t, const char *, const struct tm *); -char * _strdate(char *); -char * _strtime(char *); -time_t time(time_t *); +char * _CRTAPI1 asctime(const struct tm *); +char * _CRTAPI1 ctime(const time_t *); +clock_t _CRTAPI1 clock(void); +double _CRTAPI1 difftime(time_t, time_t); +struct tm * _CRTAPI1 gmtime(const time_t *); +struct tm * _CRTAPI1 localtime(const time_t *); +time_t _CRTAPI1 mktime(struct tm *); +size_t _CRTAPI1 strftime(char *, size_t, const char *, const struct tm *); +char * _CRTAPI1 _strdate(char *); +char * _CRTAPI1 _strtime(char *); +time_t _CRTAPI1 time(time_t *); #ifdef _POSIX_ -void tzset(void); +void _CRTAPI1 tzset(void); #else -void _tzset(void); +void _CRTAPI1 _tzset(void); #endif -unsigned _getsystime(struct tm *); -unsigned _setsystime(struct tm *, unsigned); +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 */ @@ -141,10 +174,13 @@ unsigned _setsystime(struct tm *, unsign #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__ */