3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
13 #include "support/lyxlib.h"
16 #include <sys/types.h>
25 int lyx::support::mkdir(std::string const & pathname, unsigned long int mode)
27 // FIXME: why don't we have mode_t in lyx::mkdir prototype ??
29 # if MKDIR_TAKES_ONE_ARG
31 return ::mkdir(pathname.c_str());
34 return ::mkdir(pathname.c_str(), mode_t(mode));
38 return CreateDirectory(pathname.c_str(), 0) != 0 ? 0 : -1;
40 return ::_mkdir(pathname.c_str());
42 # error "Don't know how to create a directory on this system."