|
OpenMPI
0.1.1
|
Per https://svn.open-mpi.org/trac/ompi/ticket/933, use a combination of $PWD and getcwd() to find the current working directory. More...
#include "opal_config.h"Go to the source code of this file.
Functions | |
| BEGIN_C_DECLS OPAL_DECLSPEC int | opal_getcwd (char *buf, size_t size) |
| Per https://svn.open-mpi.org/trac/ompi/ticket/933, use a combination of $PWD and getcwd() to find the current working directory. More... | |
Per https://svn.open-mpi.org/trac/ompi/ticket/933, use a combination of $PWD and getcwd() to find the current working directory.
| BEGIN_C_DECLS OPAL_DECLSPEC int opal_getcwd | ( | char * | buf, |
| size_t | size | ||
| ) |
Per https://svn.open-mpi.org/trac/ompi/ticket/933, use a combination of $PWD and getcwd() to find the current working directory.
Use $PWD instead of getcwd() a) if $PWD exists and b) is a valid synonym for the results from getcwd(). If both of these conditions are not met, just fall back and use the results of getcwd().
| buf | Caller-allocated buffer to put the result |
| size | Length of the buf array |
| OPAL_ERR_OUT_OF_RESOURCE | If internal malloc() fails. |
| OPAL_ERR_TEMP_OUT_OF_RESOURCE | If the supplied buf buffer was not long enough to handle the result. |
| OPAL_ERR_BAD_PARAM | If buf is NULL or size>INT_MAX |
| OPAL_ERR_IN_ERRNO | If an other error occurred |
| OPAL_SUCCESS | If all went well and a valid value was placed in the buf buffer. |