0001-Fix-boolean-definitions.patch 816 B

12345678910111213141516171819202122232425
  1. Index: lib/util/include/bool.h
  2. ===================================================================
  3. Don't define boolean macros for C23 standard as they are implemented
  4. as keywords.
  5. Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/
  6. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
  7. diff --git a/lib/util/include/bool.h b/lib/util/include/bool.h
  8. --- a/lib/util/include/bool.h (revision 3316)
  9. +++ b/lib/util/include/bool.h (working copy)
  10. @@ -5,7 +5,11 @@
  11. collision.
  12. */
  13. -#ifndef __cplusplus
  14. +#ifdef __cplusplus
  15. +/* bool has always been part of the C++ language */
  16. +#elif __STDC_VERSION__ >= 202311L
  17. +/* bool is part of the C23 standard */
  18. +#else
  19. /* At least the GNU compiler defines __bool_true_false_are_defined */
  20. #ifndef __bool_true_false_are_defined
  21. #define __bool_true_false_are_defined