wilde@146: #include "portpath.h" wilde@146: wilde@146: #include wilde@146: #include wilde@146: #include wilde@146: #include wilde@146: wilde@146: wilde@146: char * wilde@146: port_dirname(char *path) wilde@146: { wilde@146: #ifndef _WIN32 wilde@146: return dirname(path); wilde@146: #else wilde@164: char drive[_MAX_DRIVE]; wilde@164: char dir[_MAX_DIR]; wilde@164: _splitpath(path, drive, dir, NULL, NULL); wilde@164: /* We assume: drive + dir is shorter than wilde@164: * drive + dir + fname + ext */ wilde@164: sprintf(path, "%s%s", drive, dir); wilde@164: return path; wilde@146: #endif wilde@146: } wilde@146: wilde@146: char * wilde@146: port_realpath(char *path) wilde@146: { wilde@146: #ifndef _WIN32 wilde@146: return realpath(path, NULL); wilde@146: #else wilde@165: return _fullpath(NULL, path, 0); wilde@146: #endif wilde@146: }