--- mstools/h/float.h 2018/08/09 18:20:31 1.1.1.2 +++ mstools/h/float.h 2018/08/09 18:23:05 1.1.1.4 @@ -1,7 +1,7 @@ /*** *float.h - constants for floating point values * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved. * *Purpose: * This file contains defines for a number of implementation dependent @@ -18,12 +18,29 @@ 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 DBL_DIG 15 /* # of decimal digits of precision */ #define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ #define DBL_MANT_DIG 53 /* # of bits in mantissa */ @@ -67,10 +84,10 @@ extern "C" { /* function prototypes */ -unsigned int _clearfp(void); -unsigned int _controlfp(unsigned int,unsigned int); -unsigned int _statusfp(void); -void _fpreset(void); +unsigned int _CRTAPI1 _clearfp(void); +unsigned int _CRTAPI1 _controlfp(unsigned int,unsigned int); +unsigned int _CRTAPI1 _statusfp(void); +void _CRTAPI1 _fpreset(void); #define _clear87 _clearfp #define _status87 _statusfp @@ -121,7 +138,7 @@ void _fpreset(void); #define _SW_DENORMAL 0x00080000 /* denormal status bit */ -unsigned int _control87(unsigned int,unsigned int); +unsigned int _CRTAPI1 _control87(unsigned int,unsigned int); /* @@ -135,13 +152,15 @@ unsigned int _control87(unsigned int,uns /* initial Control Word value */ -#ifdef i386 +#ifdef _M_IX86 #define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) -#endif +#elif defined(_M_MRX000) || defined(_MIPS_) + +#define _CW_DEFAULT ( _RC_NEAR + _DN_FLUSH + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) -#ifdef MIPS +#elif defined (_ALPHA_) #define _CW_DEFAULT ( _RC_NEAR + _DN_FLUSH + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) @@ -150,7 +169,7 @@ unsigned int _control87(unsigned int,uns /* Global variable holding floating point error code */ #ifdef _MT -extern int * __fpecode(void); +extern int * _CRTAPI1 __fpecode(void); #define _fpecode (*__fpecode()) #else extern int _fpecode; @@ -182,14 +201,14 @@ extern int _fpecode; /* IEEE recommended functions */ -double _copysign (double, double); -double _chgsign (double); -double _scalb(double, long); -double _logb(double); -double _nextafter(double, double); -int _finite(double); -int _isnan(double); -int _fpclass(double); +double _CRTAPI1 _copysign (double, double); +double _CRTAPI1 _chgsign (double); +double _CRTAPI1 _scalb(double, long); +double _CRTAPI1 _logb(double); +double _CRTAPI1 _nextafter(double, double); +int _CRTAPI1 _finite(double); +int _CRTAPI1 _isnan(double); +int _CRTAPI1 _fpclass(double); #define _FPCLASS_SNAN 0x0001 /* signaling NaN */ #define _FPCLASS_QNAN 0x0002 /* quiet NaN */