File tree 3 files changed +15
-8
lines changed
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ endmacro()
19
19
20
20
use_cxx14()
21
21
22
+
23
+ if (MINGW)
24
+ # enable PRIx formatting globally
25
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS" )
26
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS" )
27
+ endif (MINGW)
28
+
22
29
####################
23
30
# GTEST
24
31
####################
Original file line number Diff line number Diff line change 23
23
namespace rtos {
24
24
class Semaphore {
25
25
public:
26
- Semaphore (int32_t count = 0 ) {} ;
27
- Semaphore (int32_t count, uint16_t max_count) {} ;
28
- void acquire () {} ;
29
- bool try_acquire () { return false ; } ;
30
- bool try_acquire_for (uint32_t millisec) { return false ; } ;
31
- bool try_acquire_until (uint64_t millisec) { return false ; } ;
32
- osStatus release (void ) { return 0 ;} ;
26
+ Semaphore (int32_t count = 0 );
27
+ Semaphore (int32_t count, uint16_t max_count);
28
+ void acquire ();
29
+ bool try_acquire ();
30
+ bool try_acquire_for (uint32_t millisec);
31
+ bool try_acquire_until (uint64_t millisec);
32
+ osStatus release (void );
33
33
};
34
34
}
35
35
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ extern "C" {
35
35
// Try to infer a platform if none was manually selected
36
36
#if !defined(EQUEUE_PLATFORM_POSIX ) \
37
37
&& !defined(EQUEUE_PLATFORM_MBED )
38
- #if defined(__unix__ ) || (defined(__APPLE__ ) && defined(__MACH__ ))
38
+ #if defined(__unix__ ) || (defined(__APPLE__ ) && defined(__MACH__ )) || defined( __MINGW32__ ) || defined( __MINGW64__ )
39
39
#define EQUEUE_PLATFORM_POSIX
40
40
#elif defined(__MBED__ )
41
41
#define EQUEUE_PLATFORM_MBED
You can’t perform that action at this time.
0 commit comments