]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/config/os/vxworks/os_defines.h
1 // Specific definitions for VxWorks -*- C++ -*-
3 // Copyright (C) 2000-2023 Free Software Foundation, Inc.
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)
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.
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.
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/>.
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}
30 #ifndef _GLIBCXX_OS_DEFINES
31 #define _GLIBCXX_OS_DEFINES 1
33 // System-specific #define, typedefs, corrections, etc, go here. This
34 // file will come before all others.
36 // The system environment we can rely on varies across VxWorks
38 #include <_vxworks-versions.h>
40 // Weak refs are supported starting with VxWorks 7, in RTP mode only
42 #if _VXWORKS_MAJOR_GE(7) && defined(__RTP__)
43 #define _GLIBCXX_USE_WEAK_REF 1
45 #define _GLIBCXX_USE_WEAK_REF 0
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
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.
60 #if _VXWORKS_MAJOR_GE(7)
62 #define _GLIBCXX_USE_C99_MATH 1
63 #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC 0
65 #undef _HAS_TR1_DECLARATIONS
66 #define _HAS_TR1_DECLARATIONS 0
68 #else // VXWORKS_MAJOR < 7
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
76 #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
78 #undef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
79 #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC 1
81 #define __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
85 // libstdc++ will include system headers and vxWorks.h ought to have
86 // been included ahead for VxWorks kernel modules prior to VxWorks 7
91 #endif // _VXWORKS_MAJOR >= 7
93 // The min/max "functions" may be refered to with a namespace prefix.
94 // Prevent possible redefinitions as macros from VxWorks headers.
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
103 #endif // _GLIBCXX_OS_DEFINES