]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/config/os/vxworks/os_defines.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / config / os / vxworks / os_defines.h
1 // Specific definitions for VxWorks -*- C++ -*-
2
3 // Copyright (C) 2000-2023 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
9 // any later version.
10
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
19
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
24
25 /** @file bits/os_defines.h
26 * This is an internal header file, included by other library headers.
27 * Do not attempt to use it directly. @headername{iosfwd}
28 */
29
30 #ifndef _GLIBCXX_OS_DEFINES
31 #define _GLIBCXX_OS_DEFINES 1
32
33 // System-specific #define, typedefs, corrections, etc, go here. This
34 // file will come before all others.
35
36 // The system environment we can rely on varies across VxWorks
37 // versions.
38 #include <_vxworks-versions.h>
39
40 // Weak refs are supported starting with VxWorks 7, in RTP mode only
41
42 #if _VXWORKS_MAJOR_GE(7) && defined(__RTP__)
43 #define _GLIBCXX_USE_WEAK_REF 1
44 #else
45 #define _GLIBCXX_USE_WEAK_REF 0
46 #endif
47
48 // We support TLS on VxWorks >= 6.6 (either directly or with emutls)
49 #if !_VXWORKS_PRE(6, 6)
50 #define _GLIBCXX_HAVE_TLS 1
51 #endif
52
53 // VxWorks7 comes with a DinkumWare library and the system headers which we
54 // are going to include for libstdc++ have a few related intrinsic
55 // assumptions. We control our own configuration here to best integrate with
56 // this environment: use C99 math headers, do not use the FP macros for
57 // dynamic cast by default (overriden for RTPs below) and arrange to disable
58 // the system TR1 declarations as we'll provide ours.
59
60 #if _VXWORKS_MAJOR_GE(7)
61
62 #define _GLIBCXX_USE_C99_MATH 1
63 #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC 0
64
65 #undef _HAS_TR1_DECLARATIONS
66 #define _HAS_TR1_DECLARATIONS 0
67
68 #else // VXWORKS_MAJOR < 7
69
70 // For RTPs, use the VxWorks headers as a basis, from which we can use
71 // C99 dynamic FP macros and expect (after fixincludes) accurate c++11
72 // prototypes for FP.
73
74 #ifdef __RTP__
75
76 #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
77
78 #undef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
79 #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC 1
80
81 #define __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
82
83 #else // !__RTP__
84
85 // libstdc++ will include system headers and vxWorks.h ought to have
86 // been included ahead for VxWorks kernel modules prior to VxWorks 7
87 #include <vxWorks.h>
88
89 #endif // __RTP__
90
91 #endif // _VXWORKS_MAJOR >= 7
92
93 // The min/max "functions" may be refered to with a namespace prefix.
94 // Prevent possible redefinitions as macros from VxWorks headers.
95 #undef NOMINMAX
96 #define NOMINMAX 1
97
98 // Do not include the inline definitions from VxWorks headers, as we'll
99 // want to use the ones from libstdc++ instead.
100 #undef _NO_CPP_INLINES
101 #define _NO_CPP_INLINES 1
102
103 #endif // _GLIBCXX_OS_DEFINES