1
1
Many changes to headers for OMPI_DECLSPEC, and 
proper placement of c_plusplus defines in those files.

mca/gpr/replica and tools are the two sets of directories
that still need work for the Windows build for this pass.

This commit was SVN r5688.
Этот коммит содержится в:
Josh Hursey 2005-05-11 20:21:10 +00:00
родитель 6714dfac4e
Коммит cc6cb5cac5
15 изменённых файлов: 83 добавлений и 23 удалений

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

@ -381,10 +381,10 @@ struct orte_dps_t {
};
typedef struct orte_dps_t orte_dps_t;
OMPI_DECLSPEC extern orte_dps_t orte_dps; /* holds dps function pointers */
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
OMPI_DECLSPEC extern orte_dps_t orte_dps; /* holds dps function pointers */
#endif /* ORTE_DPS_H */

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

@ -32,6 +32,10 @@
#include "mca/mca.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Macro definitions
*/
@ -162,4 +166,8 @@ typedef mca_errmgr_base_component_1_0_0_t mca_errmgr_base_component_t;
*/
OMPI_DECLSPEC extern orte_errmgr_base_module_t orte_errmgr; /* holds selected module's function pointers */
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -94,10 +94,9 @@ extern "C" {
#define ORTE_GPR_PACK_SYNCHRO_MODE ORTE_SYNCHRO_MODE
#define ORTE_GPR_PACK_NOTIFY_ID ORTE_UINT32
OMPI_DECLSPEC int orte_gpr_base_open(void);
OMPI_DECLSPEC int orte_gpr_base_select(void);
OMPI_DECLSPEC int orte_gpr_base_close(void);
OMPI_DECLSPEC int orte_gpr_base_open(void);
OMPI_DECLSPEC int orte_gpr_base_select(void);
OMPI_DECLSPEC int orte_gpr_base_close(void);
/* general usage functions */
OMPI_DECLSPEC int orte_gpr_base_pack_delete_segment(orte_buffer_t *cmd,
@ -213,10 +212,6 @@ int orte_gpr_base_unpack_subscription(orte_buffer_t *buffer, void *dest,
int orte_gpr_base_unpack_notify_data(orte_buffer_t *buffer, void *dest,
size_t *num_vals, orte_data_type_t type);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
/*
* globals that might be needed inside the gpr
*/
@ -225,5 +220,8 @@ extern bool orte_gpr_base_selected;
extern ompi_list_t orte_gpr_base_components_available;
extern mca_gpr_base_component_t orte_gpr_base_selected_component;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -583,10 +583,6 @@ struct mca_gpr_base_component_1_0_0_t {
typedef struct mca_gpr_base_component_1_0_0_t mca_gpr_base_component_1_0_0_t;
typedef mca_gpr_base_component_1_0_0_t mca_gpr_base_component_t;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
/*
* Macro for use in modules that are of type gpr v1.0.0
*/
@ -599,6 +595,10 @@ typedef mca_gpr_base_component_1_0_0_t mca_gpr_base_component_t;
/*
* global module that holds function pointers
*/
extern orte_gpr_base_module_t orte_gpr; /* holds selected module's function pointers */
OMPI_DECLSPEC extern orte_gpr_base_module_t orte_gpr; /* holds selected module's function pointers */
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -42,6 +42,10 @@
#include "mca/rmgr/rmgr_types.h"
#include "mca/soh/soh_types.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** Define the notify actions for the subscription system - can be OR'd
* to create multiple actions
*/
@ -204,7 +208,7 @@ typedef struct {
orte_gpr_value_t **values; /**< Array of value objects returned */
} orte_gpr_notify_data_t;
OBJ_CLASS_DECLARATION(orte_gpr_notify_data_t);
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_notify_data_t);
/** Return message for notify requests
*/
@ -245,6 +249,10 @@ typedef struct {
void *user_tag; /**< User-provided tag to be used in cbfunc */
} orte_gpr_subscription_t;
OBJ_CLASS_DECLARATION(orte_gpr_subscription_t);
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_subscription_t);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* GPR_TYPES_H */

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

@ -29,6 +29,10 @@
#include "mca/gpr/base/base.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Module open / close
*/
@ -211,4 +215,8 @@ orte_gpr_proxy_remove_notify_request(orte_gpr_notify_id_t local_idtag,
int orte_gpr_proxy_set_remote_idtag(orte_gpr_notify_id_t local_idtag,
orte_gpr_notify_id_t remote_idtag);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -38,6 +38,11 @@
#include "mca/gpr/replica/gpr_replica.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Implemented registry functions - see gpr.h for documentation
*/
@ -140,5 +145,8 @@ int orte_gpr_replica_dump_value(orte_gpr_value_t *value, int output_id);
*/
int orte_gpr_replica_preallocate_segment(char *name, size_t num_slots);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -40,6 +40,10 @@
#include "mca/gpr/replica/gpr_replica.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* GPR Replica Communications Interfaces
*/
@ -120,5 +124,8 @@ int orte_gpr_replica_recv_increment_value_cmd(orte_buffer_t *input_buffer,
int orte_gpr_replica_recv_decrement_value_cmd(orte_buffer_t *input_buffer,
orte_buffer_t *output_buffer);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -273,7 +273,7 @@ int orte_gpr_replica_construct_notify_message(orte_gpr_notify_message_t **msg,
}
}
/* no prior matching data found, so add another data location to the message */
(*msg)->data = realloc((*msg)->data, ((*msg)->cnt + 1)*sizeof(orte_gpr_notify_data_t*));
(*msg)->data = (orte_gpr_notify_data_t **) realloc((*msg)->data, ((*msg)->cnt + 1)*sizeof(orte_gpr_notify_data_t*));
if (NULL == (*msg)->data) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE;

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

@ -491,7 +491,7 @@ int orte_gpr_replica_xfer_payload(orte_gpr_value_union_t *dest,
}
dest->app_context->num_map = src->app_context->num_map;
if (NULL != src->app_context->map_data) {
dest->app_context->map_data = malloc(sizeof(orte_app_context_map_t *) * src->app_context->num_map);
dest->app_context->map_data = (orte_app_context_map_t **) malloc(sizeof(orte_app_context_map_t *) * src->app_context->num_map);
for (i = 0; i < src->app_context->num_map; ++i) {
dest->app_context->map_data[i] =
OBJ_NEW(orte_app_context_map_t);

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

@ -36,6 +36,10 @@
#include "mca/gpr/base/base.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* typedefs needed in replica component
*/
@ -327,4 +331,9 @@ int orte_gpr_replica_close(void);
orte_gpr_base_module_t *orte_gpr_replica_init(bool *allow_multi_user_threads, bool *have_hidden_threads, int *priority);
int orte_gpr_replica_finalize(void);
int orte_gpr_replica_module_init(void);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -41,6 +41,10 @@
#include "ns_types.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Component functions - all MUST be provided!
@ -641,4 +645,8 @@ typedef mca_ns_base_component_1_0_0_t mca_ns_base_component_t;
*/
OMPI_DECLSPEC extern mca_ns_base_module_t orte_ns; /* holds selected module's function pointers */
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -24,6 +24,10 @@
#include "mca/schema/schema_types.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/*
* Convenience functions for accessing ORTE data
*/
@ -103,5 +107,8 @@ typedef mca_schema_base_component_1_0_0_t mca_schema_base_component_t;
OMPI_DECLSPEC extern orte_schema_base_module_t orte_schema;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -39,7 +39,6 @@ CPP_SUBDIRS = \
ptl/self \
ptl/tcp/src \
oob/tcp \
pml/teg/src \
ns/replica/src \
ns/proxy/src \
gpr/proxy \
@ -156,7 +155,7 @@ install: win_makefile
if test -f ${CURDIR}/$${dirs}/$${exp}; then install -p ${CURDIR}/$${dirs}/$${exp} ${installdir}/$${exp}; fi;); \
done
@echo "done"
.PHONY: clean
clean:

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

@ -53,6 +53,8 @@ C_SUBDIRS = \
mca/coll/base \
mca/gpr/base \
mca/gpr/base/data_type_support \
mca/gpr/base/pack_api_cmd \
mca/gpr/base/unpack_api_response \
mca/io/base \
mca/iof/base \
mca/errmgr/base \
@ -145,8 +147,6 @@ STATIC_LIBS = \
oob\
pml\
schema \
ns\
gpr \
iof
CXXFLAGS = $(CFLAGS) $(INCL)