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

Sebastian Huber sebh at rtems.org
Tue Aug 30 04:50:27 UTC 2022


Module:    rtems
Branch:    master
Commit:    c2269908364cd60f78ba5aa747f9082a168e459b
Changeset: http://git.rtems.org/rtems/commit/?id=c2269908364cd60f78ba5aa747f9082a168e459b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Aug 29 09:10:25 2022 +0200

score: Do not expose <limits.h> to <rtems.h>

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;
 
 /**



More information about the vc mailing list