diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
commit | 3c404128c4669a1f4f190e20a89553677717fc50 (patch) | |
tree | 2db4e5031089c800c4e00fd6244e578f44a7c910 /src/utils/mkdir.cpp | |
parent | 89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff) | |
download | manaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz manaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2 manaplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz manaplus-3c404128c4669a1f4f190e20a89553677717fc50.zip |
Add missing comments into defines.
Diffstat (limited to 'src/utils/mkdir.cpp')
-rw-r--r-- | src/utils/mkdir.cpp | 27 |
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 |