summaryrefslogtreecommitdiff
path: root/src/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/path.cc')
-rw-r--r--src/path.cc28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/path.cc b/src/path.cc
index 8be2f26..1b4ede3 100644
--- a/src/path.cc
+++ b/src/path.cc
@@ -26,9 +26,9 @@
*/
#include "path.h"
-#ifndef WIN32
+#ifndef __MINGW32__
#include <libgen.h>
-#endif
+#endif/*__MINGW32__*/
#include <string.h>
#include <stdlib.h>
@@ -36,7 +36,7 @@
std::string getPath(std::string file)
{
std::string p;
-#ifndef WIN32
+#ifndef __MINGW32__
char *b = strdup(file.c_str());
p = dirname(b);
free(b);
@@ -49,25 +49,3 @@ std::string getPath(std::string file)
return p;
}
-
-#ifdef TEST_PATH
-//Additional dependency files
-//deps:
-//Required cflags (autoconf vars may be used)
-//cflags:
-//Required link options (autoconf vars may be used)
-//libs:
-#include "test.h"
-
-TEST_BEGIN;
-
-std::string a = "../dir/file";
-TEST_EQUAL_STR(getPath(a), "../dir", "relative path");
-
-std::string b = "/abs/path/file";
-TEST_EQUAL_STR(getPath(b), "/abs/path", "absolute path");
-
-
-TEST_END;
-
-#endif/*TEST_PATH*/