Skip to content

Commit 9066f61

Browse files
committed
FreeRTOS_IP.h: Fix build error introduced by 55658e1 in FreeRTOS-Kernel
1 parent 4a22215 commit 9066f61

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

source/include/FreeRTOS_IP.h

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,28 @@ uint32_t FreeRTOS_round_down( uint32_t a,
276276
#define pdMS_TO_MIN_TICKS( xTimeInMs ) ipMS_TO_MIN_TICKS( xTimeInMs )
277277

278278
#ifndef pdTRUE_SIGNED
279-
/* Temporary solution: eventually the defines below will appear in 'Source\include\projdefs.h' */
280-
#define pdTRUE_SIGNED pdTRUE
281-
#define pdFALSE_SIGNED pdFALSE
282-
#define pdTRUE_UNSIGNED ( 1U )
279+
#define pdTRUE_SIGNED pdTRUE
280+
#endif /* pdTRUE_SIGNED */
281+
282+
#ifndef pdFALSE_SIGNED
283+
#define pdFALSE_SIGNED pdFALSE
284+
#endif /* pdFALSE_SIGNED */
285+
286+
#ifndef pdTRUE_UNSIGNED
287+
#define pdTRUE_UNSIGNED ( 1U )
288+
#endif /* pdTRUE_UNSIGNED */
289+
290+
#ifndef pdFALSE_UNSIGNED
283291
#define pdFALSE_UNSIGNED ( 0U )
284-
#define ipTRUE_BOOL ( 1 == 1 )
285-
#define ipFALSE_BOOL ( 1 == 2 )
286-
#endif
292+
#endif /* pdFALSE_UNSIGNED */
293+
294+
#ifndef ipTRUE_BOOL
295+
#define ipTRUE_BOOL ( 1 == 1 )
296+
#endif /* ipTRUE_BOOL */
297+
298+
#ifndef ipFALSE_BOOL
299+
#define ipFALSE_BOOL ( 1 == 2 )
300+
#endif /* ipFALSE_BOOL */
287301

288302
/*
289303
* FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE

test/unit-test/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,20 @@ foreach( file ${TCP_INCLUDES} )
113113
execute_process( COMMAND mv ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp2.h ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp.h )
114114
endif()
115115

116+
117+
116118
# Use this tool to process all conditional declarations.
117-
execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT -UpdTRUE_SIGNED -UFreeRTOS_htonl -D__COVERITY__ -DTEST -I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src
119+
execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT
120+
-UpdTRUE_SIGNED
121+
-UpdFALSE_SIGNED
122+
-UpdTRUE_UNSIGNED
123+
-UpdFALSE_UNSIGNED
124+
-UipTRUE_BOOL
125+
-UipFALSE_BOOL
126+
-UFreeRTOS_htonl
127+
-D__COVERITY__
128+
-DTEST
129+
-I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src
118130
-I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/include
119131
-I ${UNIT_TEST_DIR}/ConfigFiles
120132
-I ${MODULE_ROOT_DIR}/source/include

0 commit comments

Comments
 (0)