a68g-platform.h
1 //! @file a68g-platform.h
2 //! @author J. Marcel van der Veer
3 //!
4 //! @section Copyright
5 //!
6 //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
7 //! Copyright 2001-2023 J. Marcel van der Veer [algol68g@xs4all.nl].
8 //!
9 //! @section License
10 //!
11 //! This program is free software; you can redistribute it and/or modify it
12 //! under the terms of the GNU General Public License as published by the
13 //! Free Software Foundation; either version 3 of the License, or
14 //! (at your option) any later version.
15 //!
16 //! This program is distributed in the hope that it will be useful, but
17 //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 //! more details. You should have received a copy of the GNU General Public
20 //! License along with this program. If not, see [http://www.gnu.org/licenses/].
21
22 //! @section Synopsis
23 //!
24 //! Platform dependent definitions.
25
26 #if ! defined (__A68G_PLATFORM_H__)
27 #define __A68G_PLATFORM_H__
28
29 #if defined (BUILD_WIN32)
30 #include "a68g-config.win32.h"
31 #else
32 #include "a68g-config.h"
33 #endif
34
35 // Decide on A68G "LEVEL".
36 //
37 // LEVEL 3 uses INT*8, REAL*10 and REAL*16 data types, when available in hardware.
38 // LEVEL 2 builds generic A68G with INT*4 and REAL*8 data types.
39 // LEVEL 1 is reserved for (possible) restrictive builds.
40
41 #if defined (BUILD_WIN32) && defined (HAVE_QUADMATH)
42 # define A68_LEVEL 3
43 #elif defined (HAVE_LONG_TYPES) && defined (HAVE_QUADMATH)
44 # define A68_LEVEL 3
45 #else
46 # define A68_LEVEL 2
47 #endif
48
49 // R mathlib
50
51 #if defined (HAVE_MATHLIB)
52 # if !defined (MATHLIB_STANDALONE)
53 # define MATHLIB_STANDALONE
54 # endif
55 #endif
56
57 // Imported libraries
58
59 #undef __cplusplus
60
61 #endif