[PATCH v2] score: Do not expose <limits.h> to <rtems.h>

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Aug 29 08:25:00 UTC 2022


The <rtems.h> header file should not unnecessarily include standard C
header files.  The <string.h> and <limits.h> header includes were
removed in 2017.

Update #4662.
---
 cpukit/include/rtems/score/interr.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h
index 0616220040..ae4966d6d8 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -38,8 +38,6 @@
 #ifndef _RTEMS_SCORE_INTERR_H
 #define _RTEMS_SCORE_INTERR_H
 
-#include <limits.h>
-
 #include <rtems/score/cpu.h>
 
 /**
@@ -177,7 +175,7 @@ typedef enum {
    * This enum value ensures that the enum type needs at least 32-bits for
    * architectures with short enums.
    */
-  RTEMS_FATAL_SOURCE_LAST = INT_MAX
+  RTEMS_FATAL_SOURCE_LAST = 0x7fffffff
 } Internal_errors_Source;
 
 /**
-- 
2.35.3



More information about the devel mailing list