Ruby: include/ruby/internal/compiler_is/sunpro.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

sunpro.h
Go to the documentation of this file.
1#ifndef RBIMPL_COMPILER_IS_SUNPRO_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_COMPILER_IS_SUNPRO_H
23#if ! (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
24# define RBIMPL_COMPILER_IS_SunPro 0
25
26#elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5100
27# define RBIMPL_COMPILER_IS_SunPro 1
28# /* __SUNPRO_C = 0xXYYZ */
29# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 12)
30# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_C >> 8 & 0xF) * 10 + (__SUNPRO_C >> 4 & 0xF))
31# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
32
33#elif defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5100
34# define RBIMPL_COMPILER_IS_SunPro 1
35# /* __SUNPRO_CC = 0xXYYZ */
36# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 12)
37# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_CC >> 8 & 0xF) * 10 + (__SUNPRO_CC >> 4 & 0xF))
38# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
39
40#elif defined(__SUNPRO_C)
41# define RBIMPL_COMPILER_IS_SunPro 1
42# /* __SUNPRO_C = 0xXYZ */
43# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 8)
44# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_C >> 4 & 0xF)
45# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
46
47#else
48# define RBIMPL_COMPILER_IS_SunPro 1
49# /* __SUNPRO_CC = 0xXYZ */
50# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 8)
51# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF)
52# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
53#endif
54
55#endif /* RBIMPL_COMPILER_IS_SUNPRO_H */