--- mstools/h/direct.h 2018/08/09 18:20:01 1.1.1.1 +++ mstools/h/direct.h 2018/08/09 18:21:14 1.1.1.3 @@ -1,7 +1,7 @@ /*** *direct.h - function declarations for directory handling/creation * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. * *Purpose: * This include file contains the function declarations for the library @@ -11,15 +11,44 @@ #ifndef _INC_DIRECT + #ifdef __cplusplus extern "C" { #endif -#if (_MSC_VER <= 600) -#define __cdecl _cdecl +/* + * 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 _SIZE_T_DEFINED typedef unsigned int size_t; #define _SIZE_T_DEFINED @@ -42,15 +71,18 @@ struct _diskfree_t { /* function prototypes */ -int _chdir(const char *); -int _chdrive(int); -char * _getcwd(char *, int); -char * _getdcwd(int, char *, int); -int _getdrive(void); -int _mkdir(const char *); -int _rmdir(const char *); -unsigned _getdiskfree(unsigned, struct _diskfree_t *); -unsigned long _getdrives(void); +int _CRTAPI1 _chdir(const char *); +int _CRTAPI1 _chdrive(int); +char * _CRTAPI1 _getcwd(char *, int); +char * _CRTAPI1 _getdcwd(int, char *, int); +int _CRTAPI1 _getdrive(void); +int _CRTAPI1 _mkdir(const char *); +int _CRTAPI1 _rmdir(const char *); +unsigned _CRTAPI1 _getdiskfree(unsigned, struct _diskfree_t *); +unsigned long _CRTAPI1 _getdrives(void); + + + #if !__STDC__ /* Non-ANSI names for compatibility */