File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / sudo / compat / stdbool.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 10:46:11 2013 UTC (10 years, 11 months ago) by misho
Branches: sudo, MAIN
CVS tags: v1_8_8p0, v1_8_8, v1_8_7p0, v1_8_7, v1_8_5p1, v1_8_10p3_0, v1_8_10p3, HEAD
1.8.7

    1: /* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */
    2: 
    3: /*
    4:  * Written by Marc Espie, September 25, 1999
    5:  * Public domain.
    6:  */
    7: 
    8: #ifndef	_COMPAT_STDBOOL_H_
    9: #define	_COMPAT_STDBOOL_H_	
   10: 
   11: #ifndef __cplusplus
   12: 
   13: #if (defined(HAVE__BOOL) && HAVE__BOOL > 0) || defined(lint)
   14: /* Support for _C99: type _Bool is already built-in. */
   15: #define false	0
   16: #define true	1
   17: 
   18: #else
   19: /* `_Bool' type must promote to `int' or `unsigned int'. */
   20: typedef enum {
   21: 	false = 0,
   22: 	true = 1
   23: } _Bool;
   24: 
   25: /* And those constants must also be available as macros. */
   26: #define	false	false
   27: #define	true	true
   28: 
   29: #endif
   30: 
   31: /* User visible type `bool' is provided as a macro which may be redefined */
   32: #define bool _Bool
   33: 
   34: #else /* __cplusplus */
   35: #define _Bool 	bool
   36: #define bool 	bool
   37: #define false 	false
   38: #define true 	true
   39: #endif /* __cplusplus */
   40: 
   41: /* Inform that everything is fine */
   42: #define __bool_true_false_are_defined 1
   43: 
   44: #endif /* _COMPAT_STDBOOL_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>