genericopenlibs/cppstdlib/stl/stlport/float.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2  * Copyright (c) 1999
       
     3  * Boris Fomitchev
       
     4  *
       
     5  * This material is provided "as is", with absolutely no warranty expressed
       
     6  * or implied. Any use is at your own risk.
       
     7  *
       
     8  * Permission to use or copy this software for any purpose is hereby granted
       
     9  * without fee, provided the above notices are retained on all copies.
       
    10  * Permission to modify the code and to distribute modified code is granted,
       
    11  * provided the above notices are retained, and a notice that the code was
       
    12  * modified is included with the above copyright notice.
       
    13  *
       
    14  */
       
    15 
       
    16 #if !defined (_STLP_OUTERMOST_HEADER_ID)
       
    17 #  define _STLP_OUTERMOST_HEADER_ID 0x203
       
    18 #  include <stl/_prolog.h>
       
    19 #elif (_STLP_OUTERMOST_HEADER_ID == 0x203) && !defined (_STLP_DONT_POP_HEADER_ID)
       
    20 #  define _STLP_DONT_POP_HEADER_ID
       
    21 #elif (_STLP_OUTERMOST_HEADER_ID == 0x203)
       
    22 #  error This header is only reentrant once, it should be modified if it has to be included more.
       
    23 #endif
       
    24 
       
    25 #if defined (_STLP_WCE_EVC3)
       
    26 struct _exception;
       
    27 #endif
       
    28 
       
    29 #include _STLP_NATIVE_C_HEADER(float.h)
       
    30 
       
    31 #if defined(__BORLANDC__) && defined (__cplusplus) && (__BORLANDC__ >= 0x560)
       
    32 _STLP_BEGIN_NAMESPACE
       
    33 using ::_max_dble;
       
    34 using ::_max_flt;
       
    35 using ::_max_ldble;
       
    36 using ::_tiny_ldble;
       
    37 _STLP_END_NAMESPACE
       
    38 #endif
       
    39 
       
    40 #if defined (__BORLANDC__) && defined (__cplusplus) && !defined (_STLP_BCC_FPU_BUG)
       
    41 #  define _STLP_BCC_FPU_BUG
       
    42 // Ignore FPU exceptions, set FPU precision to 53 bits for floatio_test and cmath_test
       
    43 static unsigned int _bcc_fpu_bug = _control87(PC_53|MCW_EM, MCW_PC|MCW_EM);
       
    44 template <class _Fp>
       
    45 int __fpclass(_Fp __val)
       
    46 { int __f = _fpclass(__val); _control87(PC_53|MCW_EM, MCW_PC|MCW_EM); return __f; }
       
    47 #  define _fpclass __fpclass
       
    48 #endif
       
    49 
       
    50 #if (_STLP_OUTERMOST_HEADER_ID == 0x203)
       
    51 #  if ! defined (_STLP_DONT_POP_HEADER_ID)
       
    52 #    include <stl/_epilog.h>
       
    53 #    undef  _STLP_OUTERMOST_HEADER_ID
       
    54 #  endif
       
    55 #  undef  _STLP_DONT_POP_HEADER_ID
       
    56 #endif