Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve backward compatibility #1881

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/mca/ess/base/ess_base_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ static pmix_status_t regex_parse_value_range(char *base, char *range,
char ***names);
static pmix_status_t read_file(char *regexp, char ***names);

#if PMIX_NUMERIC_VERSION < 0x00040207
static char *pmix_getline(FILE *fp)
{
char *ret, *buff;
char input[1024];

ret = fgets(input, 1024, fp);
if (NULL != ret) {
input[strlen(input) - 1] = '\0'; /* remove newline */
buff = strdup(input);
return buff;
}

return NULL;
}
#endif

int prte_ess_base_bootstrap(void)
{
char *path, *line, *ptr;
Expand Down
17 changes: 17 additions & 0 deletions src/mca/ras/base/ras_base_allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@

#include "src/mca/ras/base/ras_private.h"

#if PMIX_NUMERIC_VERSION < 0x00040207
static char *pmix_getline(FILE *fp)
{
char *ret, *buff;
char input[1024];

ret = fgets(input, 1024, fp);
if (NULL != ret) {
input[strlen(input) - 1] = '\0'; /* remove newline */
buff = strdup(input);
return buff;
}

return NULL;
}
#endif

char *prte_ras_base_flag_string(prte_node_t *node)
{
char *tmp, *t3, **t2 = NULL;
Expand Down
17 changes: 17 additions & 0 deletions src/mca/rmaps/rank_file/rmaps_rank_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ static int prte_rmaps_rf_process_lsf_affinity_hostfile(prte_job_t *jdata, prte_r

char *prte_rmaps_rank_file_slot_list = NULL;

#if PMIX_NUMERIC_VERSION < 0x00040207
static char *pmix_getline(FILE *fp)
{
char *ret, *buff;
char input[1024];

ret = fgets(input, 1024, fp);
if (NULL != ret) {
input[strlen(input) - 1] = '\0'; /* remove newline */
buff = strdup(input);
return buff;
}

return NULL;
}
#endif

/*
* Local variable
*/
Expand Down
17 changes: 17 additions & 0 deletions src/mca/rmaps/seq/rmaps_seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@ static bool quickmatch(prte_node_t *nd, char *name)
return false;
}

#if PMIX_NUMERIC_VERSION < 0x00040207
static char *pmix_getline(FILE *fp)
{
char *ret, *buff;
char input[1024];

ret = fgets(input, 1024, fp);
if (NULL != ret) {
input[strlen(input) - 1] = '\0'; /* remove newline */
buff = strdup(input);
return buff;
}

return NULL;
}
#endif

/*
* Sequentially map the ranks according to the placement in the
* specified hostfile
Expand Down