ALib C++ Library
Library Version:
2312 R0
Documentation generated by
home
dev
A-Worx
ALib
src
alib
lib
platforms.hpp
Go to the documentation of this file.
1
/** ************************************************************************************************
2
* \file
3
* This header file is part of the \aliblong. It does neither belong to a fileset, nor to a
4
* specific module of \alib, but is included in any \alibdist.
5
*
6
* \emoji :copyright: 2013-2023 A-Worx GmbH, Germany.
7
* Published under \ref mainpage_license "Boost Software License".
8
*
9
* \note
10
* To reduce complexity, this header is not shown in inclusion graphs of this documentation.
11
**************************************************************************************************/
12
#ifndef HPP_ALIB_PLATFORMS
13
#define HPP_ALIB_PLATFORMS 1
14
15
#if !defined(HPP_ALIB_COMPILERS) && !defined(ALIB_DOX)
16
# include "
alib/lib/compilers.hpp
"
17
#endif
18
19
// #################################################################################################
20
// basic system headers
21
// #################################################################################################
22
23
24
// Windows specific
25
#if defined (_WIN32)
26
27
//! @cond NO_DOX
28
// Include windows.h. but exclude rarely-used stuff from Windows headers. If these things are
29
// needed by the software that incorporates ALib, then windows has to be
30
// included before this header file is.
31
# if !defined (_INC_WINDOWS)
32
# define WIN32_LEAN_AND_MEAN
33
# define NOGDI
34
# define NOSERVICE
35
# define NOMCX
36
# define NOIME
37
# define NOSOUND
38
# define NOCOMM
39
# define NOKANJI
40
# define NORPC
41
# define NOPROXYSTUB
42
# define NOIMAGE
43
# define NOTAPE
44
# include <windows.h>
45
# endif
46
//! @endcond
47
48
# if !defined (_STDINT)
49
# include <stdint.h>
50
# endif
51
# include <assert.h>
52
53
#endif
54
55
56
// #################################################################################################
57
// Size of wchar_t
58
// #################################################################################################
59
#if defined(__WCHAR_MAX__)
60
#if __WCHAR_MAX__ == 0x7FFFFFFF \
61
|| __WCHAR_MAX__ == 0xFFFFFFFF
62
#define ALIB_SIZEOF_WCHAR_T 4
63
#else
64
#define ALIB_SIZEOF_WCHAR_T 2
65
#endif
66
#elif defined(_MSC_VER)
67
#define ALIB_SIZEOF_WCHAR_T 2
68
#else
69
# define ALIB_SIZEOF_WCHAR_T 4 // guessing, will be checked below
70
#endif
71
72
static_assert(
sizeof
(
wchar_t
) ==
ALIB_SIZEOF_WCHAR_T
,
"Error: Platform not supported"
);
73
74
75
76
#endif // HPP_ALIB_PLATFORMS
ALIB_SIZEOF_WCHAR_T
#define ALIB_SIZEOF_WCHAR_T
Definition:
platforms.hpp:62
compilers.hpp