File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
modules/ts/include/opencv2/ts Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 720
720
# include <io.h>
721
721
# endif
722
722
// In order to avoid having to include <windows.h>, use forward declaration
723
- // assuming CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
724
- // This assumption is verified by
725
- // WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
726
- struct _RTL_CRITICAL_SECTION;
723
+ # if GTEST_OS_WINDOWS_MINGW
724
+ // MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
725
+ // separate (equivalent) structs, instead of using typedef
726
+ typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
727
+ # else
728
+ // assuming CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
729
+ // This assumption is verified by
730
+ // WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
731
+ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
732
+ # endif
727
733
#else
728
734
// This assumes that non-Windows OSes provide unistd.h. For OSes where this
729
735
// is not the case, we need to include headers that provide the functions
@@ -3057,7 +3063,7 @@ class GTEST_API_ Mutex {
3057
3063
// by the linker.
3058
3064
MutexType type_;
3059
3065
long critical_section_init_phase_; // NOLINT
3060
- _RTL_CRITICAL_SECTION * critical_section_;
3066
+ GTEST_CRITICAL_SECTION * critical_section_;
3061
3067
3062
3068
GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
3063
3069
};
You can’t perform that action at this time.
0 commit comments