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