CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
CorsikaFenv.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
11 #include <cfenv>
12 
13 /*
14  * Same declaration of function as provided in GLIBC
15  * Repetition allowed in the case where cfenv defines the functions already, no clash.
16  */
17 extern "C" {
18 
19 int feenableexcept(int excepts) noexcept;
20 int fedisableexcept(int excepts) noexcept;
21 }
22 
23 #ifdef CORSIKA_HAS_FEENABLEEXCEPT
24 // Nothing to do, OS privides the functions
25 #else
26 #ifdef CORSIKA_OS_MAC
27 #include <corsika/detail/framework/utility/CorsikaFenvOSX.inl>
28 #else
29 #include <corsika/detail/framework/utility/CorsikaFenvFallback.inl>
30 #endif
31 #endif