File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ endmacro()
1919
2020use_cxx14()
2121
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+
2229####################
2330# GTEST
2431####################
Original file line number Diff line number Diff line change 2323namespace rtos {
2424class Semaphore {
2525public:
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 );
3333};
3434}
3535
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ extern "C" {
3535// Try to infer a platform if none was manually selected
3636#if !defined(EQUEUE_PLATFORM_POSIX ) \
3737 && !defined(EQUEUE_PLATFORM_MBED )
38- #if defined(__unix__ ) || (defined(__APPLE__ ) && defined(__MACH__ ))
38+ #if defined(__unix__ ) || (defined(__APPLE__ ) && defined(__MACH__ )) || defined( __MINGW32__ ) || defined( __MINGW64__ )
3939#define EQUEUE_PLATFORM_POSIX
4040#elif defined(__MBED__ )
4141#define EQUEUE_PLATFORM_MBED
You can’t perform that action at this time.
0 commit comments