diff --git a/src/class/orte_value_array.h b/src/class/orte_value_array.h index 856a543d3d..aa5a137887 100644 --- a/src/class/orte_value_array.h +++ b/src/class/orte_value_array.h @@ -123,7 +123,7 @@ static inline size_t orte_value_array_get_size(orte_value_array_t* array) * return the new size. */ -int orte_value_array_set_size(orte_value_array_t* array, size_t size); +OMPI_DECLSPEC int orte_value_array_set_size(orte_value_array_t* array, size_t size); /** diff --git a/src/mca/gpr/replica/functional_layer/gpr_replica_fn.h b/src/mca/gpr/replica/functional_layer/gpr_replica_fn.h index 1b68429be2..9ffd623205 100644 --- a/src/mca/gpr/replica/functional_layer/gpr_replica_fn.h +++ b/src/mca/gpr/replica/functional_layer/gpr_replica_fn.h @@ -28,6 +28,10 @@ #include "mca/gpr/replica/gpr_replica.h" +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + /* * The "fn" layer of the registry API functions - not accessible from outside * the replica @@ -285,5 +289,8 @@ int orte_gpr_replica_purge_subscriptions(orte_process_name_t *proc); int orte_gpr_replica_add_values(orte_gpr_notify_data_t **data, orte_gpr_replica_subscribed_data_t *sptr); +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif #endif diff --git a/src/mca/gpr/replica/transition_layer/gpr_replica_dict_tl.c b/src/mca/gpr/replica/transition_layer/gpr_replica_dict_tl.c index 648f32cf57..6d7e33a17c 100644 --- a/src/mca/gpr/replica/transition_layer/gpr_replica_dict_tl.c +++ b/src/mca/gpr/replica/transition_layer/gpr_replica_dict_tl.c @@ -36,7 +36,7 @@ int orte_gpr_replica_create_itag(orte_gpr_replica_itag_t *itag, orte_gpr_replica_segment_t *seg, char *name) { - orte_gpr_replica_dict_t **ptr, *new; + orte_gpr_replica_dict_t **ptr, *new_dict; size_t i; size_t len, len2; @@ -64,19 +64,19 @@ orte_gpr_replica_create_itag(orte_gpr_replica_itag_t *itag, } /* okay, name is unique - create dictionary entry */ - new = (orte_gpr_replica_dict_t*)malloc(sizeof(orte_gpr_replica_dict_t)); - if (NULL == new) { + new_dict = (orte_gpr_replica_dict_t*)malloc(sizeof(orte_gpr_replica_dict_t)); + if (NULL == new_dict) { return ORTE_ERR_OUT_OF_RESOURCE; } - new->entry = strdup(name); - if (0 > orte_pointer_array_add(&i, seg->dict, (void*)new)) { + new_dict->entry = strdup(name); + if (0 > orte_pointer_array_add(&i, seg->dict, (void*)new_dict)) { *itag = ORTE_GPR_REPLICA_ITAG_MAX; - free(new); + free(new_dict); return ORTE_ERR_OUT_OF_RESOURCE; } *itag = (orte_gpr_replica_itag_t)i; - new->itag = *itag; + new_dict->itag = *itag; return ORTE_SUCCESS; } diff --git a/src/mca/gpr/replica/transition_layer/gpr_replica_tl.h b/src/mca/gpr/replica/transition_layer/gpr_replica_tl.h index dbe8711ed6..04cd757404 100644 --- a/src/mca/gpr/replica/transition_layer/gpr_replica_tl.h +++ b/src/mca/gpr/replica/transition_layer/gpr_replica_tl.h @@ -26,6 +26,10 @@ #include "mca/gpr/replica/gpr_replica.h" +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + /* * DICTIONARY OPERATIONS */ @@ -162,4 +166,8 @@ typedef int (*orte_gpr_replica_find_seg_fn_t) (orte_gpr_replica_segment_t **seg, bool create, char *segment); +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif + #endif diff --git a/src/mca/rmgr/rmgr_types.h b/src/mca/rmgr/rmgr_types.h index cd03c321df..19ab7d547b 100644 --- a/src/mca/rmgr/rmgr_types.h +++ b/src/mca/rmgr/rmgr_types.h @@ -17,6 +17,10 @@ #ifndef ORTE_RMGR_TYPES_H #define ORTE_RMGR_TYPES_H +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + /* * REGISTRY KEY NAMES FOR COMMON DATA */ @@ -64,7 +68,7 @@ typedef struct { char *map_data; } orte_app_context_map_t; -OBJ_CLASS_DECLARATION(orte_app_context_map_t); +OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_app_context_map_t); /** @@ -96,6 +100,10 @@ typedef struct { orte_app_context_map_t **map_data; } orte_app_context_t; -OBJ_CLASS_DECLARATION(orte_app_context_t); +OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_app_context_t); + +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif #endif diff --git a/src/mca/win_makefile b/src/mca/win_makefile index 7daa6a31cc..2b546edadc 100644 --- a/src/mca/win_makefile +++ b/src/mca/win_makefile @@ -41,8 +41,7 @@ CPP_SUBDIRS = \ oob/tcp \ ns/replica/src \ ns/proxy/src \ - gpr/proxy \ - gpr/replica + gpr/proxy #list of components that are not working as yet CPP_EXCLUDE = pcm/wmi @@ -121,7 +120,8 @@ ADDLIBS = \ all: \ clibs \ - cpplibs + cpplibs \ + special prebuild: @cp '${gen_base}/coll-basic-version.h' '${copy_base}/coll/basic/' @@ -138,6 +138,13 @@ cpplibs: ${CPP_SUBDIRS} prebuild (libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; cd $$dirs; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c; echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \ done +special: prebuild + (cd gpr/replica/api_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c); + (cd gpr/replica/communications; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c); + (cd gpr/replica/functional_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c); + (cd gpr/replica/transition_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c); + (cd gpr/replica; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c; echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:mca_gpr_replica *.obj transition_layer/*.obj functional_layer/*.obj communications/*.obj api_layer/*.obj); + install: win_makefile @echo -n "Installing components ......................." @for dirs in ${CPP_SUBDIRS}; do \