[PATCH rtems-examples 01/23] Conditionalize CONFIGURE_TERMIOS_DISABLE so the examples span versions

Joel Sherrill joel at rtems.org
Wed Feb 23 22:21:29 UTC 2022


---
 misc/minimum/test.c       | 11 +++++++++++
 ticker/low_ticker/init.c  |  7 +++++++
 ticker/low_ticker1/init.c |  8 ++++++++
 3 files changed, 26 insertions(+)

diff --git a/misc/minimum/test.c b/misc/minimum/test.c
index 49176f6..729ed3a 100644
--- a/misc/minimum/test.c
+++ b/misc/minimum/test.c
@@ -90,6 +90,17 @@ void *Init(
 #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
 
 /*
+ * This parameter was eliminated after 4.11.
+ *
+ * In 4.11 and earlier, it eliminated termios from being included
+ * at all from a program.
+ */
+#if (__RTEMS_MAJOR__ < 5)
+#define CONFIGURE_TERMIOS_DISABLED
+#endif
+
+
+/*
  *  If you are debugging confdefs.h, define this
  */
 /* #define CONFIGURE_CONFDEFS_DEBUG */
diff --git a/ticker/low_ticker/init.c b/ticker/low_ticker/init.c
index ef83e0a..b71e38c 100644
--- a/ticker/low_ticker/init.c
+++ b/ticker/low_ticker/init.c
@@ -84,6 +84,13 @@ static void *Init(
 
 #define CONFIGURE_MAXIMUM_TASKS             3
 
+/*
+ * This parameter was eliminated after 4.11.
+ */
+#if (__RTEMS_MAJOR__ < 5)
+#define CONFIGURE_TERMIOS_DISABLED
+#endif
+
 #include <rtems/confdefs.h>
 
 /****************  END OF CONFIGURATION INFORMATION  ****************/
diff --git a/ticker/low_ticker1/init.c b/ticker/low_ticker1/init.c
index 4682f8e..61bdcc6 100644
--- a/ticker/low_ticker1/init.c
+++ b/ticker/low_ticker1/init.c
@@ -84,6 +84,14 @@ static void *Init(
   #define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512
 #endif
 
+/*
+ * This parameter was eliminated after 4.11.
+ */
+#if (__RTEMS_MAJOR__ < 5)
+#define CONFIGURE_TERMIOS_DISABLED
+#endif
+
+
 #define CONFIGURE_MAXIMUM_PRIORITY 15
 #define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
 #define CONFIGURE_IDLE_TASK_BODY Init
-- 
1.8.3.1



More information about the devel mailing list