1
0
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:
Mark VanderVoord
2014-07-08 12:14:26 -04:00
parent e83439528b
commit 39cc60ce56
2 changed files with 26 additions and 0 deletions

View File

@@ -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
//-------------------------------------------------------