|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef __stl_config__solaris_h |
|
18 #define __stl_config__solaris_h |
|
19 |
|
20 #define _STLP_PLATFORM "Sun Solaris" |
|
21 |
|
22 /* include system features file */ |
|
23 #include <sys/feature_tests.h> |
|
24 |
|
25 /* system-dependent defines */ |
|
26 |
|
27 /* |
|
28 * Should be fixed: |
|
29 * 1. __SunOS_5_x not defined, and no way to derive this from headers only; |
|
30 * define it with -D on compiler command line is a bad idea too. |
|
31 * |
|
32 * 2. Solaris may has, but may hasn't MATH_F and MATH_L functions (even with two |
|
33 * underscores)---this depends upon system update level and seems legally present |
|
34 * only in Solaris 10 (i.e. I saw Solaris 9 with and without __acosf in libm.so.1) |
|
35 * |
|
36 * - ptr |
|
37 */ |
|
38 |
|
39 #if defined (__SunOS_5_8) && ! defined (_STLP_HAS_NO_NEW_C_HEADERS) && ( __cplusplus >= 199711L) |
|
40 # define _STLP_HAS_NATIVE_FLOAT_ABS |
|
41 #endif |
|
42 |
|
43 #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4) |
|
44 # define _STLP_RAND48 1 |
|
45 #endif |
|
46 |
|
47 #if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) || defined (__SunOS_5_6) |
|
48 # define _STLP_WCHAR_SUNPRO_EXCLUDE 1 |
|
49 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
50 #endif |
|
51 |
|
52 /* boris : this should always be defined for Solaris 5 & 6. Any ideas how to do it? */ |
|
53 #if !(defined ( __KCC ) && __KCC_VERSION > 3400 ) && \ |
|
54 ((defined(__SunOS_5_5_1) || defined(__SunOS_5_6) )) |
|
55 # ifndef _STLP_NO_NATIVE_MBSTATE_T |
|
56 # define _STLP_NO_NATIVE_MBSTATE_T 1 |
|
57 # endif |
|
58 #endif /* KCC */ |
|
59 |
|
60 /* For SPARC we use lightweight synchronization */ |
|
61 #if defined (__sparc) /* && (defined (_REENTRANT) || defined (_PTHREADS)) */ |
|
62 # if ( (defined (__GNUC__) && defined (__sparc_v9__)) || \ |
|
63 defined (__sparcv9) ) \ |
|
64 && !defined(_NOTHREADS) && !defined (_STLP_NO_SPARC_SOLARIS_THREADS) |
|
65 # define _STLP_SPARC_SOLARIS_THREADS |
|
66 # define _STLP_THREADS_DEFINED |
|
67 # endif |
|
68 #endif |
|
69 |
|
70 /* gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus. |
|
71 * limits.h contains invalid values for this combination |
|
72 */ |
|
73 #ifdef __GNUC__ |
|
74 # if (defined (__sparc_v9__) || defined (__sparcv9)) && !defined ( __WORD64 ) && !defined(__arch64__) |
|
75 # define __LONG_MAX__ 2147483647L |
|
76 # endif |
|
77 #endif |
|
78 |
|
79 /* |
|
80 * Hmm, I don't found in Solaris 9 system headers definition like __SunOS_5_9 |
|
81 * (defined in SunPro?); I also can't find functions like fmodf (again, |
|
82 * I found modff in libc, but no acosf etc.). Strange, I saw __cosf functions |
|
83 * (built-in?) at least with gcc some time ago, but don't see ones with |
|
84 * gcc 3.3.2 on SunOS sparc-solaris1 5.9 Generic_112233-03 sun4u sparc SUNW,Ultra-60 |
|
85 * from Sorceforge's CF. |
|
86 * 2005-12-15, - ptr |
|
87 * |
|
88 * P.S. That's why I add two defines: |
|
89 */ |
|
90 |
|
91 /* #ifdef __GNUC__ */ |
|
92 #define _STLP_NO_VENDOR_MATH_F |
|
93 #define _STLP_NO_VENDOR_MATH_L |
|
94 /* #endif */ |
|
95 |
|
96 #ifdef __GNUC__ |
|
97 # define _STLP_WCHAR_BORLAND_EXCLUDE |
|
98 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
99 #endif |
|
100 |
|
101 #endif /* __stl_config__solaris_h */ |