--- mstools/h/sys/stat.h 2018/08/09 18:20:01 1.1 +++ mstools/h/sys/stat.h 2018/08/09 18:21:15 1.1.1.3 @@ -1,7 +1,7 @@ /*** -*sys\stat.h - defines structure used by stat() and fstat() +*sys/stat.h - defines structure used by stat() and fstat() * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. * *Purpose: * This file defines the structure used by the _stat() and _fstat() @@ -17,10 +17,40 @@ extern "C" { #endif -#if (_MSC_VER <= 600) -#define __cdecl _cdecl +#include + +/* + * 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 + +#elif ( _MSC_VER == 600 ) + +/* + * Definitions for old MS C6-386 compiler + */ +#define _CRTAPI1 _cdecl +#define _CRTAPI2 _cdecl +#define _M_IX86 300 + +#else + +/* + * Other compilers (e.g., MIPS) + */ +#define _CRTAPI1 +#define _CRTAPI2 + #endif + #ifndef _TIME_T_DEFINED typedef long time_t; #define _TIME_T_DEFINED @@ -65,8 +95,8 @@ struct _stat { /* function prototypes */ -int _fstat(int, struct _stat *); -int _stat(char *, struct _stat *); +int _CRTAPI1 _fstat(int, struct _stat *); +int _CRTAPI1 _stat(char *, struct _stat *); #if !__STDC__ /* Non-ANSI names for compatibility */