1
1
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
Этот коммит содержится в:
Jeff Squyres 2013-08-22 17:44:20 +00:00
родитель a200e4f865
Коммит 63ac60864b
5 изменённых файлов: 6 добавлений и 6 удалений

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

@ -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 #ifdef HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE
switch(openib_btl->device->ib_dev->transport_type) { switch(openib_btl->device->ib_dev->transport_type) {
case IBV_TRANSPORT_IB: 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) { switch(openib_btl->ib_port_attr.link_layer) {
case IBV_LINK_LAYER_ETHERNET: case IBV_LINK_LAYER_ETHERNET:
return MCA_BTL_OPENIB_TRANSPORT_RDMAOE; return MCA_BTL_OPENIB_TRANSPORT_RDMAOE;

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

@ -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; 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) { if (IBV_LINK_LAYER_ETHERNET == ib_port_attr->link_layer) {
subnet_id = mca_btl_openib_get_ip_subnet_id(device->ib_dev, subnet_id = mca_btl_openib_get_ip_subnet_id(device->ib_dev,
port_num); port_num);

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

@ -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 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 transport_type member, then we must be < OFED v1.2, and
therefore we must be IB. */ 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)) { if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
opal_output_verbose(5, ompi_btl_base_framework.framework_output, opal_output_verbose(5, ompi_btl_base_framework.framework_output,
"openib BTL: oob CPC only supported on InfiniBand; skipped on %s:%d", "openib BTL: oob CPC only supported on InfiniBand; skipped on %s:%d",

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

@ -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 /* 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 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. */ 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)) { if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
BTL_VERBOSE(("UD CPC only supported on InfiniBand; skipped on %s:%d", BTL_VERBOSE(("UD CPC only supported on InfiniBand; skipped on %s:%d",
ibv_get_device_name(btl->device->ib_dev), ibv_get_device_name(btl->device->ib_dev),

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

@ -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) static const char *link_layer_to_str(int link_type)
{ {
switch(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 */ /* If they specified neither link layer, then we want this port */
want = true; 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) { else if (flags & OMPI_COMMON_VERBS_FLAGS_LINK_LAYER_IB) {
if (IBV_LINK_LAYER_INFINIBAND == port_attr.link_layer) { if (IBV_LINK_LAYER_INFINIBAND == port_attr.link_layer) {
want = true; want = true;