Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
tests
regress
21.c.strings.stdcxx-843.cpp
Go to the documentation of this file.
1
29
#include <cassert>
30
#include <cwchar>
31
32
#ifndef _RWSTD_MBSTATE_T_SIZE
33
// explicitly include our own <rw/_defs.h> in case neither
34
// of the two above is ours (i.e., we're using the compiler's
35
// C++ C headers)
36
# include <
rw/_defs.h
>
37
#endif
// _RWSTD_MBSTATE_T_SIZE
38
39
40
// known mbstate_t sizes on major platforms
41
#ifdef _RWSTD_OS_AIX
42
# define KNOWN_SIZE sizeof(long)
43
#elif defined _RWSTD_OS_HP_UX
44
# define KNOWN_SIZE 8
45
#elif defined _RWSTD_OS_FREEBSD
46
# define KNOWN_SIZE 128
47
#elif defined _RWSTD_OS_IRIX64
48
# define KNOWN_SIZE 1
49
#elif defined _RWSTD_OS_LINUX
50
# define KNOWN_SIZE 8
51
#elif defined _RWSTD_OS_OSF1
52
# define KNOWN_SIZE 24
53
#elif defined _RWSTD_OS_SUNOS
54
# define KNOWN_SIZE (sizeof(long) == 8 ? 32 : 24)
55
#elif defined _RWSTD_OS_WINDOWS
56
# define KNOWN_SIZE 4
57
#endif
58
59
60
int
main
()
61
{
62
// verify that the size is the same as what was detectected
63
// during configuration
64
assert
(
sizeof
(std::mbstate_t) == _RWSTD_MBSTATE_T_SIZE);
65
66
#ifdef KNOWN_SIZE
67
68
// on known platforms verify that the actual size matches
69
// the size known on that platform
70
assert
(
sizeof
(std::mbstate_t) == KNOWN_SIZE);
71
72
#endif
// KNOWN_SIZE
73
74
return
0;
75
}
main
int main()
Definition
21.c.strings.stdcxx-843.cpp:60
assert
#define assert(expr)
Definition
_cassert.h:40
_defs.h
Generated by
1.9.8