diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-05-09 19:42:01 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-05-09 19:42:01 +0300 |
commit | 002a1fb117731667209dbf1278f138c8ad97bc10 (patch) | |
tree | d901f198e51a51e17f8300e60947b81a0c7d2d24 /missing_d | |
parent | bc4094635391dcb93cc3d5d6bef56a96bfff2a00 (diff) | |
download | gawk-002a1fb117731667209dbf1278f138c8ad97bc10.tar.gz |
Rework handling of bool.
Diffstat (limited to 'missing_d')
-rw-r--r-- | missing_d/gawkbool.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/missing_d/gawkbool.h b/missing_d/gawkbool.h new file mode 100644 index 00000000..c75a5a10 --- /dev/null +++ b/missing_d/gawkbool.h @@ -0,0 +1,40 @@ +/* + * gawkbool.h -- replacement definitions for bool. + */ + +/* + * Copyright (C) 2012 the Free Software Foundation, Inc. + * + * This file is part of GAWK, the GNU implementation of the + * AWK Programming Language. + * + * GAWK is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * GAWK is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* This stuff largely taken from the Autoconf doc. */ + +#ifndef __bool_true_false_are_defined +# ifndef HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# else +# define _Bool signed char +# endif +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +#endif |