1
1

Some changes that allow the mca directory to compile for Windows.

We should refrain from using the variable 'new' since it is a 
keyword in C++, and some compilers are really picky about it,
namely cl :)

Did a bit of funny wrapping in convertor.h so that the 
ompi_convertor_prepare function is only exported when
doing a windows build. Talked with George about this
change and we both agreed that the windows build is 
messy, but shouldn't corrupt the main line precausions.

Also wrapped convertor.h in the __cplusplus defines
to help with exporting the inline functions under 
windows.

This commit was SVN r6054.
Этот коммит содержится в:
Josh Hursey 2005-06-13 21:41:25 +00:00
родитель 6e919f9fb1
Коммит 1587b01a19
5 изменённых файлов: 41 добавлений и 19 удалений

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

@ -27,6 +27,10 @@
#include <sys/uio.h>
#endif
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
union dt_elem_desc;
struct ompi_datatype_t;
@ -162,7 +166,10 @@ ompi_convertor_get_unpacked_size( const ompi_convertor_t* pConv,
* outside. The data preparation should use the specialized prepare_for_send and
* prepare_for_recv functions.
*/
OMPI_DECLSPEC int ompi_convertor_prepare( ompi_convertor_t* convertor,
#ifdef WIN32
OMPI_DECLSPEC
#endif
int ompi_convertor_prepare( ompi_convertor_t* convertor,
const struct ompi_datatype_t* datatype, int32_t count,
const void* pUserBuf );
@ -216,4 +223,8 @@ OMPI_DECLSPEC void ompi_convertor_dump( ompi_convertor_t* convertor );
OMPI_DECLSPEC void ompi_ddt_dump_stack( const dt_stack_t* pStack, int stack_pos,
const union dt_elem_desc* pDesc, const char* name );
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* CONVERTOR_H_HAS_BEEN_INCLUDED */

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

@ -68,7 +68,7 @@ struct orte_gpr_proxy_notify_tracker_t {
};
typedef struct orte_gpr_proxy_notify_tracker_t orte_gpr_proxy_notify_tracker_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_proxy_notify_tracker_t);
OBJ_CLASS_DECLARATION(orte_gpr_proxy_notify_tracker_t);
#define ORTE_GPR_PROXY_MAX_SIZE INT32_MAX
#define ORTE_GPR_PROXY_BLOCK_SIZE 100

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

@ -118,21 +118,21 @@ int orte_gpr_replica_record_action(orte_gpr_replica_segment_t *seg,
orte_gpr_replica_itagval_t *iptr,
orte_gpr_replica_action_t action)
{
orte_gpr_replica_action_taken_t *new;
orte_gpr_replica_action_taken_t *new_action;
size_t index;
int rc;
new = OBJ_NEW(orte_gpr_replica_action_taken_t);
if (NULL == new) {
new_action = OBJ_NEW(orte_gpr_replica_action_taken_t);
if (NULL == new_action) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE;
}
new->action = action;
new_action->action = action;
/* store pointers to the affected itagval */
new->seg = seg;
new->cptr = cptr;
new->iptr = iptr;
new_action->seg = seg;
new_action->cptr = cptr;
new_action->iptr = iptr;
/* "retain" ALL of the respective objects so they can't disappear until
* after we process the actions
@ -142,7 +142,7 @@ int orte_gpr_replica_record_action(orte_gpr_replica_segment_t *seg,
OBJ_RETAIN(iptr);
/* add the new action record to the array */
if (0 > (rc = orte_pointer_array_add(&index, orte_gpr_replica_globals.acted_upon, new))) {
if (0 > (rc = orte_pointer_array_add(&index, orte_gpr_replica_globals.acted_upon, new_action))) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE;
}

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

@ -194,7 +194,7 @@ typedef struct {
orte_gpr_value_union_t value; /**< Actual stored value */
} orte_gpr_replica_itagval_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_replica_itagval_t);
OBJ_CLASS_DECLARATION(orte_gpr_replica_itagval_t);
typedef struct {
ompi_object_t super;
@ -258,7 +258,7 @@ struct orte_gpr_replica_triggers_t {
};
typedef struct orte_gpr_replica_triggers_t orte_gpr_replica_triggers_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_replica_triggers_t);
OBJ_CLASS_DECLARATION(orte_gpr_replica_triggers_t);
/*
* Action taken object - used to track what action was taken against what
@ -275,7 +275,7 @@ typedef struct {
orte_gpr_replica_itagval_t *iptr;
} orte_gpr_replica_action_taken_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_replica_action_taken_t);
OBJ_CLASS_DECLARATION(orte_gpr_replica_action_taken_t);
/*

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

@ -37,7 +37,7 @@ C_SUBDIRS = \
CPP_SUBDIRS = \
allocator/basic \
ptl/self \
ptl/tcp/src \
ptl/tcp \
oob/tcp \
ns/replica/src \
ns/proxy/src \
@ -130,20 +130,31 @@ prebuild:
clibs: ${C_SUBDIRS} prebuild
@for dirs in ${C_SUBDIRS}; do \
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; cd $$dirs; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CFLAGS} ${INCL} *.c; echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; \
cd $$dirs; \
echo ${CC} ${CPPFLAGS} ${INCL} *.c; \
${CC} ${CFLAGS} ${INCL} *.c; \
echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; \
${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \
done
cpplibs: ${CPP_SUBDIRS} prebuild
@for dirs in ${CPP_SUBDIRS}; do \
(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); \
(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/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);
(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 ......................."