genericopenlibs/cppstdlib/stl/stlport/stl/config/_solaris.h
changeset 0 e4d67989cc36
child 18 47c74d1534e1
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 #ifndef __stl_config__solaris_h
       
     2 #define __stl_config__solaris_h
       
     3 
       
     4 #define _STLP_PLATFORM "Sun Solaris"
       
     5 
       
     6 /* include system features file */
       
     7 #include <sys/feature_tests.h>
       
     8 
       
     9 /* system-dependent defines */
       
    10 
       
    11 /*
       
    12  * Should be fixed:
       
    13  * 1. __SunOS_5_x not defined, and no way to derive this from headers only;
       
    14  *    define it with -D on compiler command line is a bad idea too.
       
    15  *
       
    16  * 2. Solaris may has, but may hasn't MATH_F and MATH_L functions (even with two
       
    17  *    underscores)---this depends upon system update level and seems legally present
       
    18  *    only in Solaris 10 (i.e. I saw Solaris 9 with and without __acosf in libm.so.1)
       
    19  *
       
    20  *              - ptr
       
    21  */
       
    22 
       
    23 #if defined (__SunOS_5_8) && ! defined (_STLP_HAS_NO_NEW_C_HEADERS) && ( __cplusplus >= 199711L)
       
    24 #  define _STLP_HAS_NATIVE_FLOAT_ABS
       
    25 #endif
       
    26 
       
    27 #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
       
    28 # define _STLP_RAND48 1
       
    29 #endif
       
    30 
       
    31 #if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) || defined (__SunOS_5_6)
       
    32 # define _STLP_WCHAR_SUNPRO_EXCLUDE 1
       
    33 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
       
    34 #endif
       
    35 
       
    36 /* boris : this should always be defined for Solaris 5 & 6. Any ideas how to do it? */
       
    37 #if !(defined ( __KCC ) && __KCC_VERSION > 3400 ) && \
       
    38   ((defined(__SunOS_5_5_1) || defined(__SunOS_5_6) ))
       
    39 #  ifndef _STLP_NO_NATIVE_MBSTATE_T
       
    40 #    define _STLP_NO_NATIVE_MBSTATE_T 1
       
    41 #  endif
       
    42 #endif /* KCC */
       
    43 
       
    44 /* For SPARC we use lightweight synchronization */
       
    45 #if defined (__sparc) /* && (defined (_REENTRANT) || defined (_PTHREADS)) */
       
    46 #  if ( (defined (__GNUC__) && defined (__sparc_v9__)) || \
       
    47         defined (__sparcv9) ) \
       
    48        && !defined(_NOTHREADS) && !defined (_STLP_NO_SPARC_SOLARIS_THREADS)
       
    49 #    define _STLP_SPARC_SOLARIS_THREADS
       
    50 #    define _STLP_THREADS_DEFINED
       
    51 #  endif
       
    52 #endif
       
    53 
       
    54 /* gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus.
       
    55  * limits.h contains invalid values for this combination
       
    56  */
       
    57 #ifdef __GNUC__
       
    58 #  if (defined  (__sparc_v9__) || defined (__sparcv9)) && !defined ( __WORD64 ) && !defined(__arch64__)
       
    59 #    define __LONG_MAX__ 2147483647L
       
    60 #  endif
       
    61 #endif
       
    62 
       
    63 /*
       
    64  * Hmm, I don't found in Solaris 9 system headers definition like __SunOS_5_9
       
    65  * (defined in SunPro?); I also can't find functions like fmodf (again,
       
    66  * I found modff in libc, but no acosf etc.). Strange, I saw __cosf functions
       
    67  * (built-in?) at least with gcc some time ago, but don't see ones with
       
    68  * gcc 3.3.2 on SunOS sparc-solaris1 5.9 Generic_112233-03 sun4u sparc SUNW,Ultra-60
       
    69  * from Sorceforge's CF.
       
    70  *    2005-12-15, - ptr
       
    71  *
       
    72  * P.S. That's why I add two defines:
       
    73  */
       
    74 
       
    75 /* #ifdef __GNUC__ */
       
    76 #define _STLP_NO_VENDOR_MATH_F
       
    77 #define _STLP_NO_VENDOR_MATH_L
       
    78 /* #endif */
       
    79 
       
    80 #ifdef __GNUC__
       
    81 #  define _STLP_WCHAR_BORLAND_EXCLUDE
       
    82 #  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
       
    83 #endif
       
    84 
       
    85 #endif /* __stl_config__solaris_h */