30#ifndef YARP_NO_DEPRECATED
44 std::string fileName(p);
46 size_t index = fileName.rfind(
'/');
47 if (index == std::string::npos) {
49 index = fileName.rfind(
'\\');
50 if (index == std::string::npos) {
57 std::string base = fileName.substr(0, index);
64 if (ignoreLevels <= 0) {
100 if (std::strlen(hostname) == 0) {
101 std::strncpy(hostname,
"no_hostname", size);
107 char hostname[HOST_NAME_MAX];
119#if defined(__APPLE__)
120 static void* handle = 0;
121 if (!enabled && !handle) {
131#ifndef YARP_NO_DEPRECATED
147 if (std::strlen(tmp) == 0) {
148 std::strncpy(progname,
"no_progname", size);
150 std::strncpy(progname, tmp, size);
161# if defined(YARP_HAS_ACE)
163# elif defined(__unix__)
void restoreAppNap(void *activityInfo)
int mkdir(const char *p)
Portable wrapper for the mkdir() function.
int rename(const char *oldname, const char *newname)
Portable wrapper for the rename() function.
void setEnergySavingModeState(bool enabled)
Toggle the OS energy saving feature.
char * getcwd(char *buf, size_t size)
Portable wrapper for the getcwd() function.
int stat(const char *path)
Portable wrapper for the stat() function.
int getpid()
Portable wrapper for the getppid() function.
const char * getenv(const char *var)
Portable wrapper for the getenv() function.
int fork()
Portable wrapper for the fork() function.
int rmdir(const char *p)
Portable wrapper for the rmdir() function.
void setprogname(const char *progname)
Portable wrapper for the setprogname() function.
void gethostname(char *hostname, size_t size)
Portable wrapper for the gethostname() function.
void getprogname(char *progname, size_t size)
Portable wrapper for the getprogname() function.
int mkdir_p(const char *p, int ignoreLevels=0)
Create a directory and all parent directories needed.
#define YARP_COMPILER_ERROR(x)
Generate an error at build time on supported compilers.