Browse Source

stdbool.h conforming to C9X

OPENBSD_2_6
espie 25 years ago
parent
commit
5a36eeab8b
2 changed files with 23 additions and 2 deletions
  1. +2
    -2
      src/include/Makefile
  2. +21
    -0
      src/include/stdbool.h

+ 2
- 2
src/include/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.70 1999/07/01 21:41:32 deraadt Exp $
# $OpenBSD: Makefile,v 1.71 1999/09/24 22:33:10 espie Exp $
# $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $ # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
@ -15,7 +15,7 @@ FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cast.h cpio.h ctype.h \
memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \ memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
olf_abi.h paths.h poll.h pwd.h ranlib.h re_comp.h regex.h resolv.h \ olf_abi.h paths.h poll.h pwd.h ranlib.h re_comp.h regex.h resolv.h \
rmd160.h search.h setjmp.h sgtty.h sha1.h skipjack.h signal.h stab.h \ rmd160.h search.h setjmp.h sgtty.h sha1.h skipjack.h signal.h stab.h \
stddef.h stdio.h stdlib.h string.h strings.h struct.h sysexits.h \
stdbool.h stddef.h stdio.h stdlib.h string.h strings.h struct.h sysexits.h \
tar.h time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h tar.h time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h
.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips") && \ .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips") && \


+ 21
- 0
src/include/stdbool.h View File

@ -0,0 +1,21 @@
/* $OpenBSD: stdbool.h,v 1.1 1999/09/24 22:33:10 espie Exp $ */
#ifndef _STDBOOL_H_
#define _STDBOOL_H_
/* `_Bool' type must promote to `int' or `unsigned int'. */
typedef enum {
false = 0,
true = 1
} _Bool;
/* And those constants must also be available as macros. */
#define false false
#define true true
/* User visible type `bool' is provided as a macro which may be redefined */
#define bool _Bool
/* Inform that everything is fine */
#define __bool_true_false_are_defined 1
#endif /* _STDBOOL_H_ */

Loading…
Cancel
Save