1
1

The names of the defines should start with OPAL as they belong to the

OPAL layer.
We now support 64 bits Windows too.

This commit was SVN r11312.
Этот коммит содержится в:
George Bosilca 2006-08-21 21:55:41 +00:00
родитель 3f37470fec
Коммит 6ef0acf99f
3 изменённых файлов: 9 добавлений и 7 удалений

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

@ -48,7 +48,7 @@
* *
**********************************************************************/ **********************************************************************/
#ifndef __WINDOWS__ #ifndef __WINDOWS__
# if defined(_WIN32) || defined(WIN32) # if defined(_WIN32) || defined(WIN32) || defined(WIN64)
# define __WINDOWS__ # define __WINDOWS__
# endif # endif
#endif #endif
@ -143,9 +143,11 @@ typedef long long bool;
* Set the compile-time path-separator on this system * Set the compile-time path-separator on this system
*/ */
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#define OMPI_PATH_SEP "\\" #define OPAL_PATH_SEP "\\"
#define OPAL_ENV_SEP ';'
#else #else
#define OMPI_PATH_SEP "/" #define OPAL_PATH_SEP "/"
#define OPAL_ENV_SEP ':'
#endif #endif
/* /*

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

@ -95,7 +95,7 @@ data_callback(const char *key, const char *value)
for (i = 0 ; i < opal_argv_count(values) ; ++i) { for (i = 0 ; i < opal_argv_count(values) ; ++i) {
char *line; char *line;
asprintf(&line, "-I%s%s%s", OPAL_INCLUDEDIR, OMPI_PATH_SEP, values[i]); asprintf(&line, "-I%s%s%s", OPAL_INCLUDEDIR, OPAL_PATH_SEP, values[i]);
opal_argv_append_nosize(&data.preproc_flags, line); opal_argv_append_nosize(&data.preproc_flags, line);
free(line); free(line);
} }
@ -174,7 +174,7 @@ data_init(const char *appname)
/* now load the data */ /* now load the data */
asprintf(&datafile, "%s%s%s-wrapper-data.txt", asprintf(&datafile, "%s%s%s-wrapper-data.txt",
OPAL_PKGDATADIR, OMPI_PATH_SEP, appname); OPAL_PKGDATADIR, OPAL_PATH_SEP, appname);
if (NULL == datafile) return OPAL_ERR_TEMP_OUT_OF_RESOURCE; if (NULL == datafile) return OPAL_ERR_TEMP_OUT_OF_RESOURCE;
ret = opal_util_keyval_parse(datafile, data_callback); ret = opal_util_keyval_parse(datafile, data_callback);
@ -346,7 +346,7 @@ main(int argc, char *argv[])
if (data.req_file[0] != '\0') { if (data.req_file[0] != '\0') {
char *filename; char *filename;
struct stat buf; struct stat buf;
asprintf(&filename, "%s%s%s", OPAL_LIBDIR, OMPI_PATH_SEP, data.req_file); asprintf(&filename, "%s%s%s", OPAL_LIBDIR, OPAL_PATH_SEP, data.req_file);
if (0 != stat(filename, &buf)) { if (0 != stat(filename, &buf)) {
opal_show_help("help-opal-wrapper.txt", "file-not-found", true, opal_show_help("help-opal-wrapper.txt", "file-not-found", true,
base_argv0, data.req_file, data.language, NULL); base_argv0, data.req_file, data.language, NULL);

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

@ -1325,7 +1325,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
if (NULL != param) { if (NULL != param) {
/* "Parse" the param, aka remove superfluous path_sep "/". */ /* "Parse" the param, aka remove superfluous path_sep "/". */
param_len = strlen(param); param_len = strlen(param);
while (0 == strcmp (OMPI_PATH_SEP, &(param[param_len-1]))) { while (0 == strcmp (OPAL_PATH_SEP, &(param[param_len-1]))) {
param[param_len-1] = '\0'; param[param_len-1] = '\0';
param_len--; param_len--;
if (0 == param_len) { if (0 == param_len) {