Commit b208dd70 authored by Antonio J. Pena's avatar Antonio J. Pena Committed by Kenneth Raffenetti
Browse files

Fix usage of weak,alias attributes



Moved the weak,alias attribute declarations from header files to the
implementation. Complies with the requirement that alias targets are
defined in the same compilation unit.

Fixes #2002
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent 0011344a
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_enum_get_item MPI_T_enum_get_item
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_enum_get_item as PMPI_T_enum_get_item
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len) __attribute__((weak,alias("PMPI_T_enum_get_item")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_finalize MPI_T_finalize
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_finalize as PMPI_T_finalize
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_finalize(void) __attribute__((weak,alias("PMPI_T_finalize")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_init_thread MPI_T_init_thread
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_init_thread as PMPI_T_init_thread
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_init_thread(int required, int *provided) __attribute__((weak,alias("PMPI_T_init_thread")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,10 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_get_info MPI_T_pvar_get_info
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_get_info as PMPI_T_pvar_get_info
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosity, int *var_class,
MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len,
int *binding, int *readonly, int *continuous, int *atomic) __attribute__((weak,alias("PMPI_T_pvar_get_info")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_get_num MPI_T_pvar_get_num
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_get_num as PMPI_T_pvar_get_num
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_get_num(int *num_pvar) __attribute__((weak,alias("PMPI_T_pvar_get_num")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,9 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_handle_alloc MPI_T_pvar_handle_alloc
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_handle_alloc as PMPI_T_pvar_handle_alloc
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, void *obj_handle,
MPI_T_pvar_handle *handle, int *count) __attribute__((weak,alias("PMPI_T_pvar_handle_alloc")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_handle_free MPI_T_pvar_handle_free
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_handle_free as PMPI_T_pvar_handle_free
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle) __attribute__((weak,alias("PMPI_T_pvar_handle_free")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_read MPI_T_pvar_read
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_read as PMPI_T_pvar_read
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf) __attribute__((weak,alias("PMPI_T_pvar_read")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_readreset MPI_T_pvar_readreset
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_readreset as PMPI_T_pvar_readreset
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf) __attribute__((weak,alias("PMPI_T_pvar_readreset")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_reset MPI_T_pvar_reset
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_reset as PMPI_T_pvar_reset
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle) __attribute__((weak,alias("PMPI_T_pvar_reset")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_session_create MPI_T_pvar_session_create
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_session_create as PMPI_T_pvar_session_create
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_session_create(MPI_T_pvar_session *session) __attribute__((weak,alias("PMPI_T_pvar_session_create")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_session_free MPI_T_pvar_session_free
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_session_free as PMPI_T_pvar_session_free
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_session_free(MPI_T_pvar_session *session) __attribute__((weak,alias("PMPI_T_pvar_session_free")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_start MPI_T_pvar_start
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_start as PMPI_T_pvar_start
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle) __attribute__((weak,alias("PMPI_T_pvar_start")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_stop MPI_T_pvar_stop
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_stop as PMPI_T_pvar_stop
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) __attribute__((weak,alias("PMPI_T_pvar_stop")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_T_pvar_write MPI_T_pvar_write
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_T_pvar_write as PMPI_T_pvar_write
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf) __attribute__((weak,alias("PMPI_T_pvar_write")));
#endif
/* -- End Profiling Symbol Block */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment