This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stdbool.h


Sure, why not. Let's protect those C++ guys from themselves.  ;)

Cheers,
Shaun


#ifndef _STDBOOL_H_
#define _STDBOOL_H_

#ifndef __cplusplus
typedef enum { false, true } bool;
#endif

#endif


On Wed, 2003-07-02 at 17:08, Lyon wrote:
> Hello!
> 
> On 02 Jul 2003 13:52:28 -0600
> Shaun Jackman <sjackman@pathwayconnect.com> wrote:
> 
> SJ> 
> SJ> #ifndef _STDBOOL_H_
> SJ> #define _STDBOOL_H_
> SJ> 
> SJ> typedef enum { false, true } bool;
> SJ> 
> SJ> #endif
> SJ> 
> 
> Would it be compiled successfully as a C++ source? May be, 
> this needs #if !defined ( __CPLUSPLUS ) / #endif additionally?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]