diff --git a/opal/mca/pmix/pmix2x/pmix/include/pmix_common.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_common.h index 95f8749936..67236fb98f 100644 --- a/opal/mca/pmix/pmix2x/pmix/include/pmix_common.h +++ b/opal/mca/pmix/pmix2x/pmix/include/pmix_common.h @@ -1040,7 +1040,7 @@ pmix_status_t pmix_argv_append_nosize(char ***argv, const char *arg); (r) = pmix_argv_append_nosize(&(a), (b)) pmix_status_t pmix_setenv(const char *name, const char *value, - bool overwrite, char ***env); + bool overwrite, char ***env); #define PMIX_SETENV(r, a, b, c) \ (r) = pmix_setenv((a), (b), true, (c)) diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h index aa64c7f0c2..24b9349a34 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h @@ -76,7 +76,7 @@ struct pmix_pnet_globals_t { }; typedef struct pmix_pnet_globals_t pmix_pnet_globals_t; -extern pmix_pnet_globals_t pmix_pnet_globals; +PMIX_EXPORT extern pmix_pnet_globals_t pmix_pnet_globals; PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_app(char *nspace, pmix_list_t *ilist); PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_local_network(char *nspace, diff --git a/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c index 5f84f90132..d627e923a1 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c +++ b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c @@ -270,11 +270,11 @@ int pmix_rte_init(pmix_proc_type_t type, goto return_error; } - /* tell libevent that we need thread support */ - pmix_event_use_threads(); - /* if an external event base wasn't provide, create one */ if (!pmix_globals.external_evbase) { + /* tell libevent that we need thread support */ + pmix_event_use_threads(); + /* create an event base and progress thread for us */ if (NULL == (pmix_globals.evbase = pmix_progress_thread_init(NULL))) { error = "progress thread"; diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/basename.h b/opal/mca/pmix/pmix2x/pmix/src/util/basename.h index 1a6d97599f..a293e3d8ab 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/basename.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/basename.h @@ -68,7 +68,7 @@ BEGIN_C_DECLS * * The caller is responsible for freeing the returned string. */ -char *pmix_basename(const char* filename) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char *pmix_basename(const char* filename) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; /** * Return the dirname of a filename. @@ -107,7 +107,7 @@ char *pmix_basename(const char* filename) __pmix_attribute_malloc__ __pmix_attri * * The caller is responsible for freeing the returned string. */ -char *pmix_dirname(const char* filename) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char *pmix_dirname(const char* filename) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/getid.h b/opal/mca/pmix/pmix2x/pmix/src/util/getid.h index cac7c72b94..cc95371f6f 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/getid.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/getid.h @@ -23,7 +23,7 @@ BEGIN_C_DECLS /* lookup the effective uid and gid of a socket */ -pmix_status_t pmix_util_getid(int sd, uid_t *uid, gid_t *gid); +PMIX_EXPORT pmix_status_t pmix_util_getid(int sd, uid_t *uid, gid_t *gid); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/output.h b/opal/mca/pmix/pmix2x/pmix/src/util/output.h index 78bbcf119f..c3274bab7d 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/output.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/output.h @@ -249,249 +249,249 @@ struct pmix_output_stream_t { }; - /** - * Convenience typedef - */ - typedef struct pmix_output_stream_t pmix_output_stream_t; +/** + * Convenience typedef + */ +typedef struct pmix_output_stream_t pmix_output_stream_t; - /** - * Initializes the output stream system and opens a default - * "verbose" stream. - * - * @retval true Upon success. - * @retval false Upon failure. - * - * This should be the first function invoked in the output - * subsystem. After this call, the default "verbose" stream is open - * and can be written to via calls to pmix_output_verbose() and - * pmix_output_error(). - * - * By definition, the default verbose stream has a handle ID of 0, - * and has a verbose level of 0. - */ - bool pmix_output_init(void); +/** + * Initializes the output stream system and opens a default + * "verbose" stream. + * + * @retval true Upon success. + * @retval false Upon failure. + * + * This should be the first function invoked in the output + * subsystem. After this call, the default "verbose" stream is open + * and can be written to via calls to pmix_output_verbose() and + * pmix_output_error(). + * + * By definition, the default verbose stream has a handle ID of 0, + * and has a verbose level of 0. + */ +PMIX_EXPORT bool pmix_output_init(void); - /** - * Shut down the output stream system. - * - * Shut down the output stream system, including the default verbose - * stream. - */ - void pmix_output_finalize(void); +/** + * Shut down the output stream system. + * + * Shut down the output stream system, including the default verbose + * stream. + */ +PMIX_EXPORT void pmix_output_finalize(void); - /** - * Opens an output stream. - * - * @param lds A pointer to pmix_output_stream_t describing what the - * characteristics of the output stream should be. - * - * This function opens an output stream and returns an integer - * handle. The caller is responsible for maintaining the handle and - * using it in successive calls to PMIX_OUTPUT(), pmix_output(), - * pmix_output_switch(), and pmix_output_close(). - * - * If lds is NULL, the default descriptions will be used, meaning - * that output will only be sent to stderr. - * - * It is safe to have multiple threads invoke this function - * simultaneously; their execution will be serialized in an - * unspecified manner. - * - * Be sure to see pmix_output() for a description of what happens - * when open_open() / pmix_output() is directed to send output to a - * file but the process session directory does not yet exist. - */ - int pmix_output_open(pmix_output_stream_t *lds); +/** + * Opens an output stream. + * + * @param lds A pointer to pmix_output_stream_t describing what the + * characteristics of the output stream should be. + * + * This function opens an output stream and returns an integer + * handle. The caller is responsible for maintaining the handle and + * using it in successive calls to PMIX_OUTPUT(), pmix_output(), + * pmix_output_switch(), and pmix_output_close(). + * + * If lds is NULL, the default descriptions will be used, meaning + * that output will only be sent to stderr. + * + * It is safe to have multiple threads invoke this function + * simultaneously; their execution will be serialized in an + * unspecified manner. + * + * Be sure to see pmix_output() for a description of what happens + * when open_open() / pmix_output() is directed to send output to a + * file but the process session directory does not yet exist. + */ +PMIX_EXPORT int pmix_output_open(pmix_output_stream_t *lds); - /** - * Re-opens / redirects an output stream. - * - * @param output_id Stream handle to reopen - * @param lds A pointer to pmix_output_stream_t describing what the - * characteristics of the reopened output stream should be. - * - * This function redirects an existing stream into a new [set of] - * location[s], as specified by the lds parameter. If the output_id - * passed is invalid, this call is effectively the same as opening a - * new stream with a specific stream handle. - */ - int pmix_output_reopen(int output_id, pmix_output_stream_t *lds); +/** + * Re-opens / redirects an output stream. + * + * @param output_id Stream handle to reopen + * @param lds A pointer to pmix_output_stream_t describing what the + * characteristics of the reopened output stream should be. + * + * This function redirects an existing stream into a new [set of] + * location[s], as specified by the lds parameter. If the output_id + * passed is invalid, this call is effectively the same as opening a + * new stream with a specific stream handle. + */ +PMIX_EXPORT int pmix_output_reopen(int output_id, pmix_output_stream_t *lds); - /** - * Enables and disables output streams. - * - * @param output_id Stream handle to switch - * @param enable Boolean indicating whether to enable the stream - * output or not. - * - * @returns The previous enable state of the stream (true == enabled, - * false == disabled). - * - * The output of a stream can be temporarily disabled by passing an - * enable value to false, and later resumed by passing an enable - * value of true. This does not close the stream -- it simply tells - * the pmix_output subsystem to intercept and discard any output sent - * to the stream via PMIX_OUTPUT() or pmix_output() until the output - * is re-enabled. - */ - bool pmix_output_switch(int output_id, bool enable); +/** + * Enables and disables output streams. + * + * @param output_id Stream handle to switch + * @param enable Boolean indicating whether to enable the stream + * output or not. + * + * @returns The previous enable state of the stream (true == enabled, + * false == disabled). + * + * The output of a stream can be temporarily disabled by passing an + * enable value to false, and later resumed by passing an enable + * value of true. This does not close the stream -- it simply tells + * the pmix_output subsystem to intercept and discard any output sent + * to the stream via PMIX_OUTPUT() or pmix_output() until the output + * is re-enabled. + */ +PMIX_EXPORT bool pmix_output_switch(int output_id, bool enable); - /** - * \internal - * - * Reopens all existing output streams. - * - * This function should never be called by user applications; it is - * typically only invoked after a restart (i.e., in a new process) - * where output streams need to be re-initialized. - */ - void pmix_output_reopen_all(void); +/** + * \internal + * + * Reopens all existing output streams. + * + * This function should never be called by user applications; it is + * typically only invoked after a restart (i.e., in a new process) + * where output streams need to be re-initialized. + */ +PMIX_EXPORT void pmix_output_reopen_all(void); - /** - * Close an output stream. - * - * @param output_id Handle of the stream to close. - * - * Close an output stream. No output will be sent to the stream - * after it is closed. Be aware that output handles tend to be - * re-used; it is possible that after a stream is closed, if another - * stream is opened, it will get the same handle value. - */ - void pmix_output_close(int output_id); +/** + * Close an output stream. + * + * @param output_id Handle of the stream to close. + * + * Close an output stream. No output will be sent to the stream + * after it is closed. Be aware that output handles tend to be + * re-used; it is possible that after a stream is closed, if another + * stream is opened, it will get the same handle value. + */ +PMIX_EXPORT void pmix_output_close(int output_id); - /** - * Main function to send output to a stream. - * - * @param output_id Stream id returned from pmix_output_open(). - * @param format printf-style format string. - * @param varargs printf-style varargs list to fill the string - * specified by the format parameter. - * - * This is the main function to send output to custom streams (note - * that output to the default "verbose" stream is handled through - * pmix_output_verbose() and pmix_output_error()). - * - * It is never necessary to send a trailing "\n" in the strings to - * this function; some streams requires newlines, others do not -- - * this function will append newlines as necessary. - * - * Verbosity levels are ignored in this function. - * - * Note that for output streams that are directed to files, the - * files are stored under the process' session directory. If the - * session directory does not exist when pmix_output() is invoked, - * the output will be discarded! Once the session directory is - * created, pmix_output() will automatically create the file and - * writing to it. - */ - void pmix_output(int output_id, const char *format, ...) __pmix_attribute_format__(__printf__, 2, 3); +/** + * Main function to send output to a stream. + * + * @param output_id Stream id returned from pmix_output_open(). + * @param format printf-style format string. + * @param varargs printf-style varargs list to fill the string + * specified by the format parameter. + * + * This is the main function to send output to custom streams (note + * that output to the default "verbose" stream is handled through + * pmix_output_verbose() and pmix_output_error()). + * + * It is never necessary to send a trailing "\n" in the strings to + * this function; some streams requires newlines, others do not -- + * this function will append newlines as necessary. + * + * Verbosity levels are ignored in this function. + * + * Note that for output streams that are directed to files, the + * files are stored under the process' session directory. If the + * session directory does not exist when pmix_output() is invoked, + * the output will be discarded! Once the session directory is + * created, pmix_output() will automatically create the file and + * writing to it. + */ +PMIX_EXPORT void pmix_output(int output_id, const char *format, ...) __pmix_attribute_format__(__printf__, 2, 3); - /** - * Send output to a stream only if the passed verbosity level is - * high enough. - * - * @param output_id Stream id returned from pmix_output_open(). - * @param level Target verbosity level. - * @param format printf-style format string. - * @param varargs printf-style varargs list to fill the string - * specified by the format parameter. - * - * Output is only sent to the stream if the current verbosity level - * is greater than or equal to the level parameter. This mechanism - * can be used to send "information" kinds of output to user - * applications, but only when the user has asked for a high enough - * verbosity level. - * - * It is never necessary to send a trailing "\n" in the strings to - * this function; some streams requires newlines, others do not -- - * this function will append newlines as necessary. - * - * This function is really a convenience wrapper around checking the - * current verbosity level set on the stream, and if the passed - * level is less than or equal to the stream's verbosity level, this - * function will effectively invoke pmix_output to send the output to - * the stream. - * - * @see pmix_output_set_verbosity() - */ - void pmix_output_verbose(int verbose_level, int output_id, - const char *format, ...) __pmix_attribute_format__(__printf__, 3, 4); +/** + * Send output to a stream only if the passed verbosity level is + * high enough. + * + * @param output_id Stream id returned from pmix_output_open(). + * @param level Target verbosity level. + * @param format printf-style format string. + * @param varargs printf-style varargs list to fill the string + * specified by the format parameter. + * + * Output is only sent to the stream if the current verbosity level + * is greater than or equal to the level parameter. This mechanism + * can be used to send "information" kinds of output to user + * applications, but only when the user has asked for a high enough + * verbosity level. + * + * It is never necessary to send a trailing "\n" in the strings to + * this function; some streams requires newlines, others do not -- + * this function will append newlines as necessary. + * + * This function is really a convenience wrapper around checking the + * current verbosity level set on the stream, and if the passed + * level is less than or equal to the stream's verbosity level, this + * function will effectively invoke pmix_output to send the output to + * the stream. + * + * @see pmix_output_set_verbosity() + */ +PMIX_EXPORT void pmix_output_verbose(int verbose_level, int output_id, + const char *format, ...) __pmix_attribute_format__(__printf__, 3, 4); - /** - * Same as pmix_output_verbose(), but takes a va_list form of varargs. - */ - void pmix_output_vverbose(int verbose_level, int output_id, - const char *format, va_list ap) __pmix_attribute_format__(__printf__, 3, 0); +/** +* Same as pmix_output_verbose(), but takes a va_list form of varargs. +*/ +PMIX_EXPORT void pmix_output_vverbose(int verbose_level, int output_id, + const char *format, va_list ap) __pmix_attribute_format__(__printf__, 3, 0); - /** - * Set the verbosity level for a stream. - * - * @param output_id Stream id returned from pmix_output_open(). - * @param level New verbosity level - * - * This function sets the verbosity level on a given stream. It - * will be used for all future invocations of pmix_output_verbose(). - */ - void pmix_output_set_verbosity(int output_id, int level); +/** + * Set the verbosity level for a stream. + * + * @param output_id Stream id returned from pmix_output_open(). + * @param level New verbosity level + * + * This function sets the verbosity level on a given stream. It + * will be used for all future invocations of pmix_output_verbose(). + */ +PMIX_EXPORT void pmix_output_set_verbosity(int output_id, int level); - /** - * Get the verbosity level for a stream - * - * @param output_id Stream id returned from pmix_output_open() - * @returns Verbosity of stream - */ - int pmix_output_get_verbosity(int output_id); +/** + * Get the verbosity level for a stream + * + * @param output_id Stream id returned from pmix_output_open() + * @returns Verbosity of stream + */ +PMIX_EXPORT int pmix_output_get_verbosity(int output_id); - /** - * Set characteristics for output files. - * - * @param dir Directory where output files will go - * @param olddir If non-NULL, the directory where output files - * were previously opened - * @param prefix Prefix of files in the output directory - * @param oldprefix If non-NULL, the old prefix - * - * This function controls the final filename used for all new - * output streams that request output files. Specifically, when - * pmix_output_stream_t::lds_want_file is true, the output - * filename will be of the form $dir/$prefix$suffix. - * - * The default value for the output directory is whatever is - * specified in the TMPDIR environment variable if it exists, or - * $HOME if it does not. The default value for the prefix is - * "output-pid-" (where "" is replaced by the PID of the - * current process). - * - * If dir or prefix are NULL, new values are not set. The strings - * represented by dir and prefix are copied into internal storage; - * it is safe to pass string constants or free() these values - * after pmix_output_set_output_file_info() returns. - * - * If olddir or oldprefix are not NULL, copies of the old - * directory and prefix (respectively) are returned in these - * parameters. The caller is responsible for calling (free) on - * these values. This allows one to get the old values, output an - * output file in a specific directory and/or with a specific - * prefix, and then restore the old values. - * - * Note that this function only affects the creation of \em new - * streams -- streams that have already started writing to output - * files are not affected (i.e., their output files are not moved - * to the new directory). More specifically, the pmix_output - * system only opens/creates output files lazily -- so calling - * this function affects both new streams \em and any stream that - * was previously opened but had not yet output anything. - */ - void pmix_output_set_output_file_info(const char *dir, - const char *prefix, - char **olddir, - char **oldprefix); +/** + * Set characteristics for output files. + * + * @param dir Directory where output files will go + * @param olddir If non-NULL, the directory where output files + * were previously opened + * @param prefix Prefix of files in the output directory + * @param oldprefix If non-NULL, the old prefix + * + * This function controls the final filename used for all new + * output streams that request output files. Specifically, when + * pmix_output_stream_t::lds_want_file is true, the output + * filename will be of the form $dir/$prefix$suffix. + * + * The default value for the output directory is whatever is + * specified in the TMPDIR environment variable if it exists, or + * $HOME if it does not. The default value for the prefix is + * "output-pid-" (where "" is replaced by the PID of the + * current process). + * + * If dir or prefix are NULL, new values are not set. The strings + * represented by dir and prefix are copied into internal storage; + * it is safe to pass string constants or free() these values + * after pmix_output_set_output_file_info() returns. + * + * If olddir or oldprefix are not NULL, copies of the old + * directory and prefix (respectively) are returned in these + * parameters. The caller is responsible for calling (free) on + * these values. This allows one to get the old values, output an + * output file in a specific directory and/or with a specific + * prefix, and then restore the old values. + * + * Note that this function only affects the creation of \em new + * streams -- streams that have already started writing to output + * files are not affected (i.e., their output files are not moved + * to the new directory). More specifically, the pmix_output + * system only opens/creates output files lazily -- so calling + * this function affects both new streams \em and any stream that + * was previously opened but had not yet output anything. + */ +PMIX_EXPORT void pmix_output_set_output_file_info(const char *dir, + const char *prefix, + char **olddir, + char **oldprefix); - /** - * Same as pmix_output_verbose(), but pointer to buffer and size. - */ - void pmix_output_hexdump(int verbose_level, int output_id, - void *ptr, int buflen); +/** + * Same as pmix_output_verbose(), but pointer to buffer and size. + */ +PMIX_EXPORT void pmix_output_hexdump(int verbose_level, int output_id, + void *ptr, int buflen); #if PMIX_ENABLE_DEBUG /** diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/path.h b/opal/mca/pmix/pmix2x/pmix/src/util/path.h index a62160f4a0..eebda6dadc 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/path.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/path.h @@ -54,8 +54,8 @@ BEGIN_C_DECLS * * The caller is responsible for freeing the returned string. */ -char *pmix_path_find(char *fname, char **pathv, int mode, - char **envv) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char *pmix_path_find(char *fname, char **pathv, int mode, + char **envv) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; /** * Locates a file with certain permissions from a list of search @@ -75,8 +75,8 @@ char *pmix_path_find(char *fname, char **pathv, int mode, * * The caller is responsible for freeing the returned string. */ -char *pmix_path_findv(char *fname, int mode, - char **envv, char *wrkdir) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char *pmix_path_findv(char *fname, int mode, + char **envv, char *wrkdir) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; /** * Detect if the requested path is absolute or relative. * @@ -89,7 +89,7 @@ char *pmix_path_findv(char *fname, int mode, * with special care as an absolute path on Windows starts * with [A-Za-z]: or \\ instead of the usual / on UNIX. */ -bool pmix_path_is_absolute( const char *path ); +PMIX_EXPORT bool pmix_path_is_absolute( const char *path ); /** * Find the absolute path for an executable and return it. @@ -108,7 +108,7 @@ bool pmix_path_is_absolute( const char *path ); * function will return NULL. Otherwise, an newly allocated string * will be returned. */ -char* pmix_find_absolute_path( char* app_name ) __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char* pmix_find_absolute_path( char* app_name ) __pmix_attribute_warn_unused_result__; /** * Forms a complete pathname and checks it for existance and @@ -123,7 +123,7 @@ char* pmix_find_absolute_path( char* app_name ) __pmix_attribute_warn_unused_res * * The caller is responsible for freeing the returned string. */ -char *pmix_path_access(char *fname, char *path, int mode) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char *pmix_path_access(char *fname, char *path, int mode) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__; /** @@ -143,7 +143,7 @@ char *pmix_path_access(char *fname, char *path, int mode) __pmix_attribute_mallo * @retval true If fname is on NFS, Lustre or Panasas * @retval false otherwise */ -bool pmix_path_nfs(char *fname, char **fstype) __pmix_attribute_warn_unused_result__; +PMIX_EXPORT bool pmix_path_nfs(char *fname, char **fstype) __pmix_attribute_warn_unused_result__; /** * @brief Returns the disk usage of path. @@ -154,9 +154,8 @@ bool pmix_path_nfs(char *fname, char **fstype) __pmix_attribute_warn_unused_resu * @retval PMIX_SUCCESS If the operation was successful * @retval PMIX_ERROR otherwise */ -int -pmix_path_df(const char *path, - uint64_t *out_avail)__pmix_attribute_warn_unused_result__; +PMIX_EXPORT int pmix_path_df(const char *path, + uint64_t *out_avail)__pmix_attribute_warn_unused_result__; END_C_DECLS #endif /* PMIX_PATH_H */ diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h index 244f50ace6..0848116b3e 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h @@ -65,7 +65,7 @@ BEGIN_C_DECLS * one of the two is NULL, the other list is simply copied to the * output. If both are NULL, NULL is returned. */ -char **pmix_environ_merge(char **minor, char **major) __pmix_attribute_warn_unused_result__; +PMIX_EXPORT char **pmix_environ_merge(char **minor, char **major) __pmix_attribute_warn_unused_result__; /** * Portable version of setenv(3), allowing editing of any @@ -113,8 +113,8 @@ char **pmix_environ_merge(char **minor, char **major) __pmix_attribute_warn_unus * pmix_setenv("foo", "bar", true, &my_env); * \endcode */ -pmix_status_t pmix_setenv(const char *name, const char *value, - bool overwrite, char ***env) __pmix_attribute_nonnull__(1); +PMIX_EXPORT pmix_status_t pmix_setenv(const char *name, const char *value, + bool overwrite, char ***env) __pmix_attribute_nonnull__(1); /** * Portable version of unsetenv(3), allowing editing of any @@ -130,13 +130,13 @@ pmix_status_t pmix_setenv(const char *name, const char *value, * If \em name is found in \em env, the string corresponding to * that entry is freed and its entry is eliminated from the array. */ -pmix_status_t pmix_unsetenv(const char *name, char ***env) __pmix_attribute_nonnull__(1); +PMIX_EXPORT pmix_status_t pmix_unsetenv(const char *name, char ***env) __pmix_attribute_nonnull__(1); /* A consistent way to retrieve the home and tmp directory on all supported * platforms. */ -const char* pmix_home_directory( void ); -const char* pmix_tmp_directory( void ); +PMIX_EXPORT const char* pmix_home_directory( void ); +PMIX_EXPORT const char* pmix_tmp_directory( void ); /* Some care is needed with environ on OS X when dealing with shared libraries. Handle that care here... */ diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/printf.h b/opal/mca/pmix/pmix2x/pmix/src/util/printf.h index 4fa8ecc687..81c6d28482 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/printf.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/printf.h @@ -53,7 +53,7 @@ BEGIN_C_DECLS * * THIS IS A PORTABILITY FEATURE: USE snprintf() in CODE. */ -int pmix_snprintf(char *str, size_t size, const char *fmt, ...) __pmix_attribute_format__(__printf__, 3, 4); +PMIX_EXPORT int pmix_snprintf(char *str, size_t size, const char *fmt, ...) __pmix_attribute_format__(__printf__, 3, 4); /** @@ -78,7 +78,7 @@ int pmix_snprintf(char *str, size_t size, const char *fmt, ...) __pmix_attribut * * THIS IS A PORTABILITY FEATURE: USE vsnprintf() in CODE. */ -int pmix_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __pmix_attribute_format__(__printf__, 3, 0); +PMIX_EXPORT int pmix_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __pmix_attribute_format__(__printf__, 3, 0); /** * Allocates and writes to a string under the control of a format @@ -99,7 +99,7 @@ int pmix_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __pmix_ * * THIS IS A PORTABILITY FEATURE: USE asprintf() in CODE. */ -int pmix_asprintf(char **ptr, const char *fmt, ...) __pmix_attribute_format__(__printf__, 2, 3); +PMIX_EXPORT int pmix_asprintf(char **ptr, const char *fmt, ...) __pmix_attribute_format__(__printf__, 2, 3); /** @@ -123,7 +123,7 @@ int pmix_asprintf(char **ptr, const char *fmt, ...) __pmix_attribute_format__(_ * * THIS IS A PORTABILITY FEATURE: USE vasprintf() in CODE. */ -int pmix_vasprintf(char **ptr, const char *fmt, va_list ap) __pmix_attribute_format__(__printf__, 2, 0); +PMIX_EXPORT int pmix_vasprintf(char **ptr, const char *fmt, va_list ap) __pmix_attribute_format__(__printf__, 2, 0); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/show_help.h b/opal/mca/pmix/pmix2x/pmix/src/util/show_help.h index 13ba1adc57..1a4efefe2f 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/show_help.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/show_help.h @@ -101,7 +101,7 @@ BEGIN_C_DECLS * * Initialization of show_help subsystem */ -int pmix_show_help_init(void); +PMIX_EXPORT int pmix_show_help_init(void); /** @@ -109,7 +109,7 @@ int pmix_show_help_init(void); * * Finalization of show_help subsystem */ -int pmix_show_help_finalize(void); +PMIX_EXPORT int pmix_show_help_finalize(void); /** @@ -170,7 +170,7 @@ PMIX_EXPORT char* pmix_show_help_vstring(const char *filename, * nees to tell show_help how to find its own show_help files - without * interfering with the linked ORTE libs when they need to do show_help. */ -int pmix_show_help_add_dir(const char *directory); +PMIX_EXPORT int pmix_show_help_add_dir(const char *directory); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/timings.h b/opal/mca/pmix/pmix2x/pmix/src/util/timings.h index 3550ce3ae0..87e7621430 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/util/timings.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/timings.h @@ -66,14 +66,14 @@ typedef struct { } pmix_timing_prep_t; /* Pass down our namespace and rank for pretty-print purposes */ -void pmix_init_id(char* nspace, int rank); +PMIX_EXPORT void pmix_init_id(char* nspace, int rank); /** * Initialize timing structure. * * @param t pointer to the timing handler structure */ -void pmix_timing_init(pmix_timing_t *t); +PMIX_EXPORT void pmix_timing_init(pmix_timing_t *t); /** * Prepare timing event, do all printf-like processing. @@ -85,7 +85,7 @@ void pmix_timing_init(pmix_timing_t *t); * * @retval partly filled pmix_timing_prep_t structure */ -pmix_timing_prep_t pmix_timing_prep_ev(pmix_timing_t *t, const char *fmt, ...); +PMIX_EXPORT pmix_timing_prep_t pmix_timing_prep_ev(pmix_timing_t *t, const char *fmt, ...); /** * Prepare timing event, ignore printf-like processing. @@ -97,7 +97,7 @@ pmix_timing_prep_t pmix_timing_prep_ev(pmix_timing_t *t, const char *fmt, ...); * * @retval partly filled pmix_timing_prep_t structure */ -pmix_timing_prep_t pmix_timing_prep_ev_end(pmix_timing_t *t, const char *fmt, ...); +PMIX_EXPORT pmix_timing_prep_t pmix_timing_prep_ev_end(pmix_timing_t *t, const char *fmt, ...); /** * Enqueue timing event into the list of events in handler 't'. @@ -109,8 +109,8 @@ pmix_timing_prep_t pmix_timing_prep_ev_end(pmix_timing_t *t, const char *fmt, .. * * @retval */ -void pmix_timing_add_step(pmix_timing_prep_t p, const char *func, - const char *file, int line); +PMIX_EXPORT void pmix_timing_add_step(pmix_timing_prep_t p, const char *func, + const char *file, int line); /** * Enqueue the description of the interval into a list of events @@ -123,8 +123,8 @@ void pmix_timing_add_step(pmix_timing_prep_t p, const char *func, * * @retval id of event interval */ -int pmix_timing_descr(pmix_timing_prep_t p, const char *func, - const char *file, int line); +PMIX_EXPORT int pmix_timing_descr(pmix_timing_prep_t p, const char *func, + const char *file, int line); /** * Enqueue the beginning of timing interval that already has the @@ -138,8 +138,8 @@ int pmix_timing_descr(pmix_timing_prep_t p, const char *func, * * @retval */ -void pmix_timing_start_id(pmix_timing_t *t, int id, const char *func, - const char *file, int line); +PMIX_EXPORT void pmix_timing_start_id(pmix_timing_t *t, int id, const char *func, + const char *file, int line); /** * Enqueue the end of timing interval that already has @@ -153,8 +153,8 @@ void pmix_timing_start_id(pmix_timing_t *t, int id, const char *func, * * @retval */ -void pmix_timing_end(pmix_timing_t *t, int id, const char *func, - const char *file, int line ); +PMIX_EXPORT void pmix_timing_end(pmix_timing_t *t, int id, const char *func, + const char *file, int line ); /** * Enqueue both description and start of timing interval @@ -188,8 +188,8 @@ static inline int pmix_timing_start_init(pmix_timing_prep_t p, * * @retval interval id */ -void pmix_timing_end_prep(pmix_timing_prep_t p, - const char *func, const char *file, int line); +PMIX_EXPORT void pmix_timing_end_prep(pmix_timing_prep_t p, + const char *func, const char *file, int line); /** * Report all events that were enqueued in the timing handler 't'. @@ -207,7 +207,7 @@ void pmix_timing_end_prep(pmix_timing_prep_t p, * @retval PMIX_SUCCESS On success * @retval PMIX_ERROR or PMIX_ERR_OUT_OF_RESOURCE On failure */ -pmix_status_t pmix_timing_report(pmix_timing_t *t, char *fname); +PMIX_EXPORT pmix_status_t pmix_timing_report(pmix_timing_t *t, char *fname); /** * Report all intervals that were enqueued in the timing handler 't'. @@ -224,7 +224,7 @@ pmix_status_t pmix_timing_report(pmix_timing_t *t, char *fname); * @retval PMIX_SUCCESS On success * @retval PMIX_ERROR or PMIX_ERR_OUT_OF_RESOURCE On failure */ -pmix_status_t pmix_timing_deltas(pmix_timing_t *t, char *fname); +PMIX_EXPORT pmix_status_t pmix_timing_deltas(pmix_timing_t *t, char *fname); /** * Release all memory allocated for the timing handler 't'. @@ -233,7 +233,7 @@ pmix_status_t pmix_timing_deltas(pmix_timing_t *t, char *fname); * * @retval */ -void pmix_timing_release(pmix_timing_t *t); +PMIX_EXPORT void pmix_timing_release(pmix_timing_t *t); /** * Macro for passing down process id - compiled out