]> git.lyx.org Git - lyx.git/blobdiff - src/support/mkdir.C
* lyxfunctional.h: delete compare_memfun and helper classes
[lyx.git] / src / support / mkdir.C
index 580fcc8f94a1d2a73ab9e47097e2d4f8a0d368b9..546bbf8e654f6a3338affdba977dbb8af5ccb2e3 100644 (file)
@@ -1,3 +1,13 @@
+/**
+ * \file mkdir.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#ifdef CXX_WORKING_NAMESPACES
-namespace lyx {
-       int mkdir(char const * pathname, unsigned long int mode)
-       {
-               return ::mkdir(pathname, mode);
-       }
-}
-#else
 #include "lyxlib.h"
 
-int lyx::mkdir(char const * pathname, unsigned long int mode)
+int lyx::support::mkdir(std::string const & pathname, unsigned long int mode)
 {
-       return ::mkdir(pathname, mode);
+       // FIXME: why don't we have mode_t in lyx::mkdir prototype ??
+       return ::mkdir(pathname.c_str(), mode_t(mode));
 }
-#endif