mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-24 17:01:35 +01:00
- support "weak" function definitions when available with compiler.
This commit is contained in:
@@ -260,6 +260,26 @@ extern int UNITY_OUTPUT_CHAR(int);
|
||||
#define UNITY_COUNTER_TYPE _U_UINT
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Language Features Available
|
||||
//-------------------------------------------------------
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define UNITY_SUPPORT_WEAK __attribute__((weak))
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#define UNITY_SUPPORT_WEAK __attribute__((weak))
|
||||
#endif
|
||||
|
||||
#ifndef UNITY_WEAK
|
||||
#ifdef UNITY_SUPPORT_WEAK
|
||||
#define UNITY_WEAK __attribute__((weak))
|
||||
#else
|
||||
#define UNITY_WEAK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Internal Structs Needed
|
||||
//-------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user