All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions
@ 2025-07-25 12:07 yegorslists--- via buildroot
  2025-07-28 20:56 ` Thomas Petazzoni via buildroot
  2025-07-28 22:28 ` Julien Olivain via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: yegorslists--- via buildroot @ 2025-07-25 12:07 UTC (permalink / raw)
  To: buildroot; +Cc: Alvaro G . M

From: Yegor Yefremov <yegorslists@googlemail.com>

Don't define boolean macros for C23 standard as they are implemented
as keywords.

Fixes the following error:

make[2]: Entering directory
'/home/user/Documents/versioned/oss/xmlrpc-c/lib/util'
gcc -c -DNDEBUG -pthread -Wall -W -Wno-uninitialized -Wundef
-Wno-unknown-pragmas -Wmissing-declarations -Wstrict-prototypes
-Wmissing-prototypes -Wimplicit -fno-common -g -O3
-Isrcdir/lib/util/include
-I/home/user/Documents/versioned/oss/xmlrpc-c   casprintf.c
In file included from casprintf.c:9:
srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword ‘false’
as enumeration constant
   13 |     false = 0,
      |     ^~~~~
srcdir/lib/util/include/bool.h:13:5: note: ‘false’ is a keyword with
‘-std=c23’ onwards
srcdir/lib/util/include/bool.h:15:3: error: expected ‘;’, identifier
or ‘(’ before ‘bool’
   15 | } bool;
      |   ^~~~
srcdir/lib/util/include/bool.h:15:3: warning: useless type name in
empty declaration

Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
Changes v1 -> v2:
  - add upstream commit URL

 .../0001-Fix-boolean-definitions.patch        | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/libxmlrpc/0001-Fix-boolean-definitions.patch

diff --git a/package/libxmlrpc/0001-Fix-boolean-definitions.patch b/package/libxmlrpc/0001-Fix-boolean-definitions.patch
new file mode 100644
index 0000000000..0fdfdf7f03
--- /dev/null
+++ b/package/libxmlrpc/0001-Fix-boolean-definitions.patch
@@ -0,0 +1,25 @@
+Index: lib/util/include/bool.h
+===================================================================
+Don't define boolean macros for C23 standard as they are implemented
+as keywords.
+
+Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+
+diff --git a/lib/util/include/bool.h b/lib/util/include/bool.h
+--- a/lib/util/include/bool.h	(revision 3316)
++++ b/lib/util/include/bool.h	(working copy)
+@@ -5,7 +5,11 @@
+    collision.
+ */
+ 
+-#ifndef __cplusplus
++#ifdef __cplusplus
++/* bool has always been part of the C++ language */
++#elif __STDC_VERSION__ >= 202311L
++/* bool is part of the C23 standard */
++#else
+ /* At least the GNU compiler defines __bool_true_false_are_defined */
+ #ifndef __bool_true_false_are_defined
+ #define __bool_true_false_are_defined
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions
  2025-07-25 12:07 [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions yegorslists--- via buildroot
@ 2025-07-28 20:56 ` Thomas Petazzoni via buildroot
  2025-07-31 13:08   ` Yegor Yefremov via buildroot
  2025-07-28 22:28 ` Julien Olivain via buildroot
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-07-28 20:56 UTC (permalink / raw)
  To: yegorslists--- via buildroot; +Cc: Alvaro G . M

Hello,

On Fri, 25 Jul 2025 14:07:43 +0200
yegorslists--- via buildroot <buildroot@buildroot.org> wrote:

> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> Don't define boolean macros for C23 standard as they are implemented
> as keywords.
> 
> Fixes the following error:
> 
> make[2]: Entering directory
> '/home/user/Documents/versioned/oss/xmlrpc-c/lib/util'
> gcc -c -DNDEBUG -pthread -Wall -W -Wno-uninitialized -Wundef
> -Wno-unknown-pragmas -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wimplicit -fno-common -g -O3
> -Isrcdir/lib/util/include
> -I/home/user/Documents/versioned/oss/xmlrpc-c   casprintf.c
> In file included from casprintf.c:9:
> srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword ‘false’
> as enumeration constant
>    13 |     false = 0,
>       |     ^~~~~
> srcdir/lib/util/include/bool.h:13:5: note: ‘false’ is a keyword with
> ‘-std=c23’ onwards
> srcdir/lib/util/include/bool.h:15:3: error: expected ‘;’, identifier
> or ‘(’ before ‘bool’
>    15 | } bool;
>       |   ^~~~
> srcdir/lib/util/include/bool.h:15:3: warning: useless type name in
> empty declaration
> 
> Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Thanks, looks good.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Shouldn't we try to update (separately)? Apparently we're still using:

# 1.60.01 (code/advanced@r3176)
LIBXMLRPC_VERSION = r3176

But there's a new 1.60.05 according to
https://xmlrpc-c.sourceforge.io/change_super_stable.html:

Release 1.60.05

Released 25.03.28

    Fix crash when memory allocation fails in XML parsing, when built to use libxml2 XML parser. Broken in Xmlrpc-c 1.57 (December 2019).
    Build: fix failure to install interface header files when using separate build directory. 

Maybe we should use it?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions
  2025-07-25 12:07 [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions yegorslists--- via buildroot
  2025-07-28 20:56 ` Thomas Petazzoni via buildroot
@ 2025-07-28 22:28 ` Julien Olivain via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2025-07-28 22:28 UTC (permalink / raw)
  To: yegorslists; +Cc: buildroot, Alvaro G . M

On 25/07/2025 14:07, yegorslists--- via buildroot wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> Don't define boolean macros for C23 standard as they are implemented
> as keywords.
> 
> Fixes the following error:
> 
> make[2]: Entering directory
> '/home/user/Documents/versioned/oss/xmlrpc-c/lib/util'
> gcc -c -DNDEBUG -pthread -Wall -W -Wno-uninitialized -Wundef
> -Wno-unknown-pragmas -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wimplicit -fno-common -g -O3
> -Isrcdir/lib/util/include
> -I/home/user/Documents/versioned/oss/xmlrpc-c   casprintf.c
> In file included from casprintf.c:9:
> srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword ‘false’
> as enumeration constant
>    13 |     false = 0,
>       |     ^~~~~
> srcdir/lib/util/include/bool.h:13:5: note: ‘false’ is a keyword with
> ‘-std=c23’ onwards
> srcdir/lib/util/include/bool.h:15:3: error: expected ‘;’, identifier
> or ‘(’ before ‘bool’
>    15 | } bool;
>       |   ^~~~
> srcdir/lib/util/include/bool.h:15:3: warning: useless type name in
> empty declaration
> 
> Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions
  2025-07-28 20:56 ` Thomas Petazzoni via buildroot
@ 2025-07-31 13:08   ` Yegor Yefremov via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Yegor Yefremov via buildroot @ 2025-07-31 13:08 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: yegorslists--- via buildroot, Alvaro G . M

Hi Thomas,

On Mon, Jul 28, 2025 at 10:56 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Fri, 25 Jul 2025 14:07:43 +0200
> yegorslists--- via buildroot <buildroot@buildroot.org> wrote:
>
> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >
> > Don't define boolean macros for C23 standard as they are implemented
> > as keywords.
> >
> > Fixes the following error:
> >
> > make[2]: Entering directory
> > '/home/user/Documents/versioned/oss/xmlrpc-c/lib/util'
> > gcc -c -DNDEBUG -pthread -Wall -W -Wno-uninitialized -Wundef
> > -Wno-unknown-pragmas -Wmissing-declarations -Wstrict-prototypes
> > -Wmissing-prototypes -Wimplicit -fno-common -g -O3
> > -Isrcdir/lib/util/include
> > -I/home/user/Documents/versioned/oss/xmlrpc-c   casprintf.c
> > In file included from casprintf.c:9:
> > srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword ‘false’
> > as enumeration constant
> >    13 |     false = 0,
> >       |     ^~~~~
> > srcdir/lib/util/include/bool.h:13:5: note: ‘false’ is a keyword with
> > ‘-std=c23’ onwards
> > srcdir/lib/util/include/bool.h:15:3: error: expected ‘;’, identifier
> > or ‘(’ before ‘bool’
> >    15 | } bool;
> >       |   ^~~~
> > srcdir/lib/util/include/bool.h:15:3: warning: useless type name in
> > empty declaration
> >
> > Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/
> >
> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> Thanks, looks good.
>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>
> Shouldn't we try to update (separately)? Apparently we're still using:
>
> # 1.60.01 (code/advanced@r3176)
> LIBXMLRPC_VERSION = r3176
>
> But there's a new 1.60.05 according to
> https://xmlrpc-c.sourceforge.io/change_super_stable.html:
>
> Release 1.60.05
>
> Released 25.03.28
>
>     Fix crash when memory allocation fails in XML parsing, when built to use libxml2 XML parser. Broken in Xmlrpc-c 1.57 (December 2019).
>     Build: fix failure to install interface header files when using separate build directory.
>
> Maybe we should use it?

I am working on this. Though libxml2 doesn't play any role now but it
will after an update.

Best regards,
Yegor

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-07-31 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 12:07 [Buildroot] [PATCH v2] package/libxmlrpc: fix boolean definitions yegorslists--- via buildroot
2025-07-28 20:56 ` Thomas Petazzoni via buildroot
2025-07-31 13:08   ` Yegor Yefremov via buildroot
2025-07-28 22:28 ` Julien Olivain via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.