Skip to content

Commit c5b7f4a

Browse files
author
Oleh Kulykov
committed
1722266635
1 parent 8dad478 commit c5b7f4a

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

src/plzma.cpp

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,46 @@
5454
// #define __GNUC__ 12
5555
// #define __SIZEOF_SIZE_T__ 8
5656
// #define __x86_64 1
57-
58-
#if defined(__clang__)
59-
# if __has_feature(cxx_rtti)
60-
# define RTTI_ENABLED 1
61-
# endif
62-
#elif defined(__GNUG__)
63-
# if defined(__GXX_RTTI)
64-
# define RTTI_ENABLED 1
65-
# endif
66-
#elif defined(LIBPLZMA_MSC)
57+
// g++
58+
// #define __MINGW32__ 1
59+
// #define _WIN64 1
60+
// #define __WIN64 1
61+
// #define __GNUC__ 12
62+
// #define __GXX_RTTI 1
63+
// #define __cplusplus 201703L
64+
// #define __WIN32__ 1
65+
// #define __GNUG__ 12
66+
// #define __SIZEOF_SIZE_T__ 8
67+
// #define __x86_64 1
68+
// #define __SIZEOF_POINTER__ 8
69+
// #define __VERSION__ "12.2.0"
70+
// #define _WIN32 1
71+
// #define __cpp_rtti 199711L
72+
// #define __x86_64__ 1
73+
// #define __MSVCRT__ 1 !!!!!!!!!
74+
// #define __EXCEPTIONS 1
75+
// #define WIN32 1
76+
// #define WIN64 1
77+
// #define __WIN32 1
78+
// #define __MINGW64__ 1
79+
// #define __WIN64__ 1
80+
81+
82+
#if (defined(__clang__) && __has_feature(cxx_rtti))
83+
# define RTTI_ENABLED 1
84+
#elif (defined(__GNUG__) && defined(__GXX_RTTI) && (__GXX_RTTI > 0))
85+
# define RTTI_ENABLED 1
86+
#elif (defined(__cpp_rtti) && (__cpp_rtti > 0))
87+
// MinGW
88+
# define RTTI_ENABLED 1
89+
#elif (defined(LIBPLZMA_MSC) && defined(_CPPRTTI) && (_CPPRTTI > 0))
6790
// Defined as 1 if the /GR (Enable Run-Time Type Information) compiler option is set. Otherwise, undefined.
6891
// When /GR is on, the compiler defines the _CPPRTTI preprocessor macro.
6992
// By default, /GR is on. /GR- disables run-time type information.
7093
// However, /GR increases the size of the .rdata sections of your image.
7194
// If your code does not use dynamic_cast or typeid, /GR- may produce a smaller image.
7295
// https://learn.microsoft.com/en-us/cpp/build/reference/gr-enable-run-time-type-information
73-
# if (defined(_CPPRTTI) && (_CPPRTTI > 0))
74-
# define RTTI_ENABLED 1
75-
# endif
96+
# define RTTI_ENABLED 1
7697
#endif
7798

7899
#if defined(RTTI_ENABLED) && defined(LIBPLZMA_NO_CPP_RTTI)

0 commit comments

Comments
 (0)