We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f22f657 commit a3f5e7bCopy full SHA for a3f5e7b
1 file changed
include/czmq_prelude.h
@@ -530,15 +530,16 @@ typedef struct {
530
531
532
// Fallback for booleans for pre-C23 C and MSVC builds
533
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 202311L
534
-# if (defined (_MSC_VER))
535
-# if (!defined (__cplusplus) && (!defined (true)))
536
-# define true 1
537
-# define false 0
538
- typedef char bool;
539
-# endif
+#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
+# include <stdbool.h>
+# elif defined(_MSC_VER)
+ typedef char bool;
+# define true 1
+# define false 0
540
+# define __bool_true_false_are_defined 1
541
# else
-# include <stdbool.h>
542
543
# endif
544
#endif
545
0 commit comments