From cc20409f60b379dc5b23173a752f5d44935f97d1 Mon Sep 17 00:00:00 2001 From: Shiqing Fan Date: Wed, 22 Aug 2012 14:53:46 +0000 Subject: [PATCH] A few more header protection. Replace "ERROR" with "error". Remove redefinitions of mca_sbgp_base_module_t. This commit was SVN r27109. --- ompi/mca/sbgp/base/sbgp_base_open.c | 6 +++--- ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c | 3 ++- ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c | 4 ++++ ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c | 5 ++++- ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c | 4 ++++ ompi/mca/sbgp/p2p/sbgp_p2p_component.c | 5 ++++- ompi/mca/sbgp/p2p/sbgp_p2p_module.c | 4 ++++ 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ompi/mca/sbgp/base/sbgp_base_open.c b/ompi/mca/sbgp/base/sbgp_base_open.c index d8fcb4603b..8a5f989e2f 100644 --- a/ompi/mca/sbgp/base/sbgp_base_open.c +++ b/ompi/mca/sbgp/base/sbgp_base_open.c @@ -139,7 +139,7 @@ static int ompi_sbgp_set_components_to_use(opal_list_t *sbgp_components_avail, subgoups_requested[i]); RELEASE_LIST_OF_STRINGS(sbgp_string); rc = OMPI_ERROR; - goto ERROR; + goto error; } /* loop over discovered components */ for (item = opal_list_get_first(sbgp_components_avail) ; @@ -171,7 +171,7 @@ static int ompi_sbgp_set_components_to_use(opal_list_t *sbgp_components_avail, if (NULL == clj) { rc = OPAL_ERR_OUT_OF_RESOURCE; RELEASE_LIST_OF_STRINGS(sbgp_string); - goto ERROR; + goto error; } /* fprintf(stderr,"sbgp selecting %s %s\n", sbgp_component, component_name); */ @@ -195,7 +195,7 @@ static int ompi_sbgp_set_components_to_use(opal_list_t *sbgp_components_avail, ** release resources ** */ /* subgoups_requested */ -ERROR: +error: /* RELEASE_LIST_OF_STRINGS(subgoups_requested); */ return rc; diff --git a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c index 1d618c35b1..6b8c281af9 100644 --- a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c +++ b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c @@ -15,7 +15,9 @@ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include #ifdef HAVE_SYS_MMAN_H #include @@ -53,7 +55,6 @@ const char *mca_sbgp_basesmsocket_component_version_string = static int basesmsocket_open(void); static int basesmsocket_close(void); -struct mca_sbgp_base_module_t; static mca_sbgp_base_module_t *mca_sbgp_basesmsocket_select_procs(struct ompi_proc_t ** procs, int n_procs_in, struct ompi_communicator_t *comm, diff --git a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c index 736570d903..480ff2365f 100644 --- a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c +++ b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c @@ -14,9 +14,13 @@ */ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include diff --git a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c index 05a4ed0ffa..1e8ac3f16c 100644 --- a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c +++ b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c @@ -14,9 +14,13 @@ */ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include "ompi/constants.h" @@ -38,7 +42,6 @@ const char *mca_sbgp_basesmuma_component_version_string = static int basesmuma_open(void); static int basesmuma_close(void); -struct mca_sbgp_base_module_t; static mca_sbgp_base_module_t *mca_sbgp_basesmuma_select_procs(struct ompi_proc_t ** procs, int n_procs_in, struct ompi_communicator_t *comm, char *key, void *output_data); diff --git a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c index c8dfe60706..6150a705d7 100644 --- a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c +++ b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c @@ -14,9 +14,13 @@ */ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include diff --git a/ompi/mca/sbgp/p2p/sbgp_p2p_component.c b/ompi/mca/sbgp/p2p/sbgp_p2p_component.c index 697319b351..8377107164 100644 --- a/ompi/mca/sbgp/p2p/sbgp_p2p_component.c +++ b/ompi/mca/sbgp/p2p/sbgp_p2p_component.c @@ -14,9 +14,13 @@ */ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include "ompi/constants.h" @@ -39,7 +43,6 @@ const char *mca_sbgp_p2p_component_version_string = static int p2p_open(void); static int p2p_close(void); -struct mca_sbgp_base_module_t; static mca_sbgp_base_module_t * mca_sbgp_p2p_select_procs(struct ompi_proc_t ** procs, int n_procs_in, struct ompi_communicator_t *comm, char *key, void *output_data); diff --git a/ompi/mca/sbgp/p2p/sbgp_p2p_module.c b/ompi/mca/sbgp/p2p/sbgp_p2p_module.c index 54d336cd08..3546d0d3cb 100644 --- a/ompi/mca/sbgp/p2p/sbgp_p2p_module.c +++ b/ompi/mca/sbgp/p2p/sbgp_p2p_module.c @@ -14,9 +14,13 @@ */ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include