Ruby
3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
include
ruby
internal
compiler_is
msvc.h
1
#ifndef RBIMPL_COMPILER_IS_MSVC_H
/*-*-C++-*-vi:se ft=cpp:*/
2
#define RBIMPL_COMPILER_IS_MSVC_H
22
#include "ruby/internal/compiler_is/clang.h"
23
#include "ruby/internal/compiler_is/intel.h"
24
25
#if ! defined(_MSC_VER)
26
# define RBIMPL_COMPILER_IS_MSVC 0
27
28
#elif RBIMPL_COMPILER_IS(Clang)
29
# define RBIMPL_COMPILER_IS_MSVC 0
30
31
#elif RBIMPL_COMPILER_IS(Intel)
32
# define RBIMPL_COMPILER_IS_MSVC 0
33
34
#elif _MSC_VER >= 1400
35
# define RBIMPL_COMPILER_IS_MSVC 1
36
#
/* _MSC_FULL_VER = XXYYZZZZZ */
37
# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 10000000)
38
# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 10000000 / 100000)
39
# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 100000)
40
41
#elif defined(_MSC_FULL_VER)
42
# define RBIMPL_COMPILER_IS_MSVC 1
43
#
/* _MSC_FULL_VER = XXYYZZZZ */
44
# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 1000000)
45
# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 1000000 / 10000)
46
# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 10000)
47
48
#else
49
# define RBIMPL_COMPILER_IS_MSVC 1
50
#
/* _MSC_VER = XXYY */
51
# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_VER / 100)
52
# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_VER % 100)
53
# define RBIMPL_COMPILER_VERSION_PATCH 0
54
#endif
55
56
#endif
/* RBIMPL_COMPILER_IS_MSVC_H */
Generated by
1.9.8