mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] memedit: fix C23 compatibility
@ 2025-12-14 17:18 Lucas Stach
  2026-01-15 15:12 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2025-12-14 17:18 UTC (permalink / raw)
  To: ptxdist

So it can be built with compilers that default to the
newer C standard.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 ...stdbool.h-instead-of-rolling-our-own.patch | 36 +++++++++++++++++++
 patches/memedit-0.9/series                    |  4 +++
 2 files changed, 40 insertions(+)
 create mode 100644 patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch
 create mode 100644 patches/memedit-0.9/series

diff --git a/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch
new file mode 100644
index 000000000000..5ba25a6da9ff
--- /dev/null
+++ b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch
@@ -0,0 +1,36 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Sun, 14 Dec 2025 18:12:57 +0100
+Subject: [PATCH] use stdbool.h instead of rolling our own
+
+With C23 bool is now a proper keyword, so we can not use
+the check if bool is defined to gate our own fallback.
+
+Use stdbool.h instead to have bool types across different
+compiler versions.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ memedit_parser.h | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/memedit_parser.h b/memedit_parser.h
+index c5db019b7cde..bed7544a789e 100644
+--- a/memedit_parser.h
++++ b/memedit_parser.h
+@@ -14,15 +14,9 @@
+ **
+ ******************************************************************************/
+ 
++#include <stdbool.h>
+ #include <stdio.h>
+ 
+-#ifndef bool
+-typedef enum bool_t
+-{
+-  false = 0, true
+-} bool;
+-#endif
+-
+ /* customized structure for command line parameters */
+ struct arg_t
+ {
diff --git a/patches/memedit-0.9/series b/patches/memedit-0.9/series
new file mode 100644
index 000000000000..4c98424f3381
--- /dev/null
+++ b/patches/memedit-0.9/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-use-stdbool.h-instead-of-rolling-our-own.patch
+# 84c619bd32bb289e17dd64b996d9ffb8  - git-ptx-patches magic
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] memedit: fix C23 compatibility
  2025-12-14 17:18 [ptxdist] [PATCH] memedit: fix C23 compatibility Lucas Stach
@ 2026-01-15 15:12 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2026-01-15 15:12 UTC (permalink / raw)
  To: ptxdist; +Cc: Lucas Stach

Thanks, applied as ca4334f2bb8b35079a6f5a4d9e1ec54c333ea6a2.

Michael

[sent from post-receive hook]

On Thu, 15 Jan 2026 16:12:01 +0100, Lucas Stach <l.stach@pengutronix.de> wrote:
> So it can be built with compilers that default to the
> newer C standard.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20251214171838.114312-1-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch
> new file mode 100644
> index 000000000000..5ba25a6da9ff
> --- /dev/null
> +++ b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch
> @@ -0,0 +1,36 @@
> +From: Lucas Stach <l.stach@pengutronix.de>
> +Date: Sun, 14 Dec 2025 18:12:57 +0100
> +Subject: [PATCH] use stdbool.h instead of rolling our own
> +
> +With C23 bool is now a proper keyword, so we can not use
> +the check if bool is defined to gate our own fallback.
> +
> +Use stdbool.h instead to have bool types across different
> +compiler versions.
> +
> +Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> +---
> + memedit_parser.h | 8 +-------
> + 1 file changed, 1 insertion(+), 7 deletions(-)
> +
> +diff --git a/memedit_parser.h b/memedit_parser.h
> +index c5db019b7cde..bed7544a789e 100644
> +--- a/memedit_parser.h
> ++++ b/memedit_parser.h
> +@@ -14,15 +14,9 @@
> + **
> + ******************************************************************************/
> + 
> ++#include <stdbool.h>
> + #include <stdio.h>
> + 
> +-#ifndef bool
> +-typedef enum bool_t
> +-{
> +-  false = 0, true
> +-} bool;
> +-#endif
> +-
> + /* customized structure for command line parameters */
> + struct arg_t
> + {
> diff --git a/patches/memedit-0.9/series b/patches/memedit-0.9/series
> new file mode 100644
> index 000000000000..4c98424f3381
> --- /dev/null
> +++ b/patches/memedit-0.9/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-use-stdbool.h-instead-of-rolling-our-own.patch
> +# 84c619bd32bb289e17dd64b996d9ffb8  - git-ptx-patches magic



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-15 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-14 17:18 [ptxdist] [PATCH] memedit: fix C23 compatibility Lucas Stach
2026-01-15 15:12 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox