[Midnight Commander] #239: double declaration of bool false and true (conflicting with stdbool.h)
Ticket System
tickets at midnight-commander.org
Tue Feb 3 17:04:27 UTC 2009
#239: double declaration of bool false and true (conflicting with stdbool.h)
---------------------------------------------------+------------------------
Reporter: Patrick Winnertz <winnie at debian.org> | Owner: metux
Type: defect | Status: accepted
Priority: major | Milestone: 4.6.3
Component: mc-core | Version: 4.6.2
Resolution: | Keywords: review
Blocking: | Blockedby:
---------------------------------------------------+------------------------
Changes (by metux):
* keywords: => review
Old description:
> Hey,
> There is already a definition of bool in C, which uses also false and
> true,
> therefore mc fails to build with ncurses currently as ncurses include
> stdbool.h> where these are defined:
>
> #ifndef _STDBOOL_H
> #define _STDBOOL_H
>
> #ifndef __cplusplus
>
> #define bool _Bool
> #define true 1
> #define false 0
>
> #else /* __cplusplus */
> .....
> #endif
>
> So we should remove this completly from mhl/* and use this instead.
New description:
Hey,
There is already a definition of bool in C, which uses also false and
true,
therefore mc fails to build with ncurses currently as ncurses include
stdbool.h> where these are defined:
#ifndef _STDBOOL_H
#define _STDBOOL_H
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#else /* __cplusplus */
.....
#endif
So we should remove this completly from mhl/* and use this instead.
----
branch:239_fix_bool
changeset:540fec5a7ab46e928536fdc38c6b3dfdf4483a8a
(this is for mc-4.6 branch, for master see #240)
--
--
Ticket URL: <www.midnight-commander.org/ticket/239#comment:3>
Midnight Commander <www.midnight-commander.org>
Midnight Development Center
More information about the mc-devel
mailing list