From 63ac60864bd58dfc9af3ac8164b76ca5e74abd3e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 22 Aug 2013 17:44:20 +0000 Subject: [PATCH] Refs trac:3730 Turns out that AC_CHECK_DECLS is one of the "new style" Autoconf macros that #defines the output to be 0 or 1 (vs. #define'ing or #undef'ing it). So don't check for "#if defined(..."; just check for "#if ...". This commit was SVN r29059. The following Trac tickets were found above: Ticket 3730 --> https://svn.open-mpi.org/trac/ompi/ticket/3730 --- ompi/mca/btl/openib/btl_openib.c | 2 +- ompi/mca/btl/openib/btl_openib_component.c | 2 +- ompi/mca/btl/openib/connect/btl_openib_connect_oob.c | 2 +- ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c | 2 +- ompi/mca/common/verbs/common_verbs_find_ports.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ompi/mca/btl/openib/btl_openib.c b/ompi/mca/btl/openib/btl_openib.c index 242b930181..4e07869ef5 100644 --- a/ompi/mca/btl/openib/btl_openib.c +++ b/ompi/mca/btl/openib/btl_openib.c @@ -445,7 +445,7 @@ mca_btl_openib_transport_type_t mca_btl_openib_get_transport_type(mca_btl_openib #ifdef HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE switch(openib_btl->device->ib_dev->transport_type) { case IBV_TRANSPORT_IB: -#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET switch(openib_btl->ib_port_attr.link_layer) { case IBV_LINK_LAYER_ETHERNET: return MCA_BTL_OPENIB_TRANSPORT_RDMAOE; diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index db0f461475..45785ad103 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -718,7 +718,7 @@ static int init_one_port(opal_list_t *btl_list, mca_btl_openib_device_t *device, return OMPI_ERR_NOT_FOUND; } -#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET if (IBV_LINK_LAYER_ETHERNET == ib_port_attr->link_layer) { subnet_id = mca_btl_openib_get_ip_subnet_id(device->ib_dev, port_num); diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c b/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c index 521ebaa849..e8683d3762 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c @@ -125,7 +125,7 @@ static int oob_component_query(mca_btl_openib_module_t *btl, IB (this CPC will not work with iWarp). If we do not have the transport_type member, then we must be < OFED v1.2, and therefore we must be IB. */ -#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && HAVE_DECL_IBV_LINK_LAYER_ETHERNET if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) { opal_output_verbose(5, ompi_btl_base_framework.framework_output, "openib BTL: oob CPC only supported on InfiniBand; skipped on %s:%d", diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c b/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c index deb7324319..cf8c4e56fb 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -389,7 +389,7 @@ static int udcm_component_query(mca_btl_openib_module_t *btl, /* If we do not have struct ibv_device.transport_device, then we're in an old version of OFED that is IB only (i.e., no iWarp), so we can safely assume that we can use this CPC. */ -#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && HAVE_DECL_IBV_LINK_LAYER_ETHERNET if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) { BTL_VERBOSE(("UD CPC only supported on InfiniBand; skipped on %s:%d", ibv_get_device_name(btl->device->ib_dev), diff --git a/ompi/mca/common/verbs/common_verbs_find_ports.c b/ompi/mca/common/verbs/common_verbs_find_ports.c index 3509959f1d..c8a1f28640 100644 --- a/ompi/mca/common/verbs/common_verbs_find_ports.c +++ b/ompi/mca/common/verbs/common_verbs_find_ports.c @@ -170,7 +170,7 @@ static const char *transport_name_to_str(enum ibv_transport_type transport_type) } } -#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET static const char *link_layer_to_str(int link_type) { switch(link_type) { @@ -417,7 +417,7 @@ opal_list_t *ompi_common_verbs_find_ports(const char *if_include, /* If they specified neither link layer, then we want this port */ want = true; } -#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET) +#if HAVE_DECL_IBV_LINK_LAYER_ETHERNET else if (flags & OMPI_COMMON_VERBS_FLAGS_LINK_LAYER_IB) { if (IBV_LINK_LAYER_INFINIBAND == port_attr.link_layer) { want = true;