summaryrefslogtreecommitdiff
path: root/src/utils/mkdir.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/utils/mkdir.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmv-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
mv-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/utils/mkdir.cpp')
-rw-r--r--src/utils/mkdir.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index 25a8ba521..000bfeed4 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -24,16 +24,10 @@
#if defined WIN32
#include <limits.h>
#include <windows.h>
-#endif
+#endif // defined WIN32
#include <sys/stat.h>
-#ifdef M_MKDIR_TEST_
-// compile with -D_MKDIR_TEST_ to get a standalone binary
-#include <cstdio>
-#include <cstdlib>
-#endif
-
#include "debug.h"
#if defined WIN32
@@ -101,15 +95,12 @@ int mkdir_r(const char *const pathname)
return -1;
}
-#ifdef M_MKDIR_TEST_
- printf("%s\n", tmp);
-#endif
*p = '/';
}
}
return 0;
}
-#else
+#else // WIN32
/// Create a directory, making leading components first if necessary
int mkdir_r(const char *const pathname)
@@ -164,22 +155,10 @@ int mkdir_r(const char *const pathname)
return -1;
}
-#ifdef M_MKDIR_TEST_
- printf("%s\n", tmp);
-#endif
*p = '/';
}
}
delete []tmp;
return 0;
}
-#endif
-
-#ifdef M_MKDIR_TEST_
-int main(int argc, char** argv)
-{
- if (argc < 2)
- exit(1);
- mkdir_r(argv[1]);
-}
-#endif
+#endif // WIN32