Skip to content

Commit 57b7c44

Browse files
author
Ralph Castain
committed
Cleanup the rest of the no-longer-required bool configury
1 parent a809902 commit 57b7c44

File tree

4 files changed

+5
-58
lines changed

4 files changed

+5
-58
lines changed

config/c_get_alignment.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ dnl
2626
AC_DEFUN([OPAL_C_GET_ALIGNMENT],[
2727
AC_CACHE_CHECK([alignment of $1],
2828
[AS_TR_SH([opal_cv_c_align_$1])],
29-
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
29+
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
30+
#include <stdbool.h> ],
3031
[[
3132
struct foo { char c; $1 x; };
3233
struct foo *p = (struct foo *) malloc(sizeof(struct foo));

configure.ac

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ AC_CHECK_SIZEOF(pid_t)
419419
# Check for type alignments
420420
#
421421

422-
OPAL_C_GET_ALIGNMENT(_Bool, OPAL_ALIGNMENT_BOOL)
422+
OPAL_C_GET_ALIGNMENT(bool, OPAL_ALIGNMENT_BOOL)
423423
OPAL_C_GET_ALIGNMENT(int8_t, OPAL_ALIGNMENT_INT8)
424424
OPAL_C_GET_ALIGNMENT(int16_t, OPAL_ALIGNMENT_INT16)
425425
OPAL_C_GET_ALIGNMENT(int32_t, OPAL_ALIGNMENT_INT32)
@@ -460,23 +460,6 @@ fi
460460
OPAL_C_GET_ALIGNMENT(void *, OPAL_ALIGNMENT_VOID_P)
461461
OPAL_C_GET_ALIGNMENT(size_t, OPAL_ALIGNMENT_SIZE_T)
462462

463-
#
464-
# Does the C compiler native support "bool"? (i.e., without
465-
# <stdbool.h> or any other help)
466-
#
467-
468-
OPAL_VAR_SCOPE_PUSH([MSG])
469-
AC_MSG_CHECKING(for C bool type)
470-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
471-
AC_INCLUDES_DEFAULT],
472-
[[bool bar, foo = true; bar = foo;]])],
473-
[OPAL_NEED_C_BOOL=0 MSG=yes],[OPAL_NEED_C_BOOL=1 MSG=no])
474-
AC_DEFINE_UNQUOTED(OPAL_NEED_C_BOOL, $OPAL_NEED_C_BOOL,
475-
[Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)])
476-
AC_MSG_RESULT([$MSG])
477-
AC_CHECK_SIZEOF(_Bool)
478-
OPAL_VAR_SCOPE_POP
479-
480463
#
481464
# Check for other compiler characteristics
482465
#
@@ -636,37 +619,6 @@ AC_CHECK_HEADERS([net/if.h], [], [],
636619
#endif
637620
])
638621

639-
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
640-
# have both Portland and GNU installed; using pgcc will find GNU's
641-
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
642-
# "_Bool" [see
643-
# http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html],
644-
# and Portland has no idea what to do with _Bool).
645-
646-
# So first figure out if we have <stdbool.h> (i.e., check the value of
647-
# the macro HAVE_STDBOOL_H from the result of AC_CHECK_HEADERS,
648-
# above). If we do have it, then check to see if it actually works.
649-
# Define OPAL_USE_STDBOOL_H as approrpaite.
650-
AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0])
651-
OPAL_VAR_SCOPE_PUSH([MSG])
652-
AC_MSG_CHECKING([if <stdbool.h> works])
653-
if test "$have_stdbool_h" = "1"; then
654-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
655-
AC_INCLUDES_DEFAULT[
656-
#if HAVE_STDBOOL_H
657-
#include <stdbool.h>
658-
#endif]],
659-
[[bool bar, foo = true; bar = foo;]])],
660-
[OPAL_USE_STDBOOL_H=1 MSG=yes],[OPAL_USE_STDBOOL_H=0 MSG=no])
661-
else
662-
OPAL_USE_STDBOOL_H=0
663-
MSG="no (do not have <stdbool.h>)"
664-
fi
665-
AC_DEFINE_UNQUOTED(OPAL_USE_STDBOOL_H, $OPAL_USE_STDBOOL_H,
666-
[Whether to use <stdbool.h> or not])
667-
AC_MSG_RESULT([$MSG])
668-
OPAL_VAR_SCOPE_POP
669-
670622
# checkpoint results
671623
AC_CACHE_SAVE
672624

test/datatype/position.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
7-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
7+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
88
* $COPYRIGHT$
99
*
1010
* Additional copyrights may follow
@@ -15,9 +15,6 @@
1515
#include "ompi_config.h"
1616
#include <stdio.h>
1717
#include <string.h>
18-
#if OPAL_USE_STDBOOL_H
19-
#include <stdbool.h>
20-
#endif
2118

2219
#include "opal/datatype/opal_convertor.h"
2320
#include "ompi/datatype/ompi_datatype.h"

test/datatype/position_noncontig.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
7-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
7+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
88
* $COPYRIGHT$
99
*
1010
* Additional copyrights may follow
@@ -15,9 +15,6 @@
1515
#include "ompi_config.h"
1616
#include <stdio.h>
1717
#include <string.h>
18-
#if OPAL_USE_STDBOOL_H
19-
#include <stdbool.h>
20-
#endif
2118

2219
#include "opal/datatype/opal_convertor.h"
2320
#include "ompi/datatype/ompi_datatype.h"

0 commit comments

Comments
 (0)