1
1

Ensure that we always have the "bool" type in C, as well as the constants

"true" and "false", either via the C99 header <stdbool.h> or via our own
declarations.

This commit was SVN r91.
Этот коммит содержится в:
Jeff Squyres 2004-01-07 19:33:37 +00:00
родитель 4bbf27828f
Коммит 20dd96c391
2 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -83,6 +83,7 @@ AH_TOP([/* -*- c -*-
#define LAM_CONFIG_H
])
AH_BOTTOM([
#include <lam_config.h>
#endif /* LAM_CONFIG_H */
])
@ -136,6 +137,8 @@ LAM_SETUP_CC
# check for c99 features
AC_C_INLINE
AC_CHECK_HEADERS(stdbool.h)
# JMS This macro will be re-written by Dave for licensing reasons
AX_CREATE_STDINT_H([src/include/lam_stdint.h])

21
src/include/lam_config_bottom.h Обычный файл
Просмотреть файл

@ -0,0 +1,21 @@
/*
* $HEADER$
*
* This file is included at the bottom of lam_config.h, and is
* therefore a) after all the #define's that were output from
* configure, and b) included in most/all files in LAM/MPI.
*
* Since this file is *only* ever included by lam_config.h, and
* lam_config.h already has #ifndef/#endif protection, there is no
* need to #ifndef/#endif protection here.
*/
/* If we're in C, bring in the bool type and true/false constants. */
#ifndef __cplusplus
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#else
typedef enum { false, true } bool;
#endif
#endif