diff options
Diffstat (limited to 'navit/support/libc/mkdir.c')
-rw-r--r-- | navit/support/libc/mkdir.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/navit/support/libc/mkdir.c b/navit/support/libc/mkdir.c new file mode 100644 index 000000000..ae8d21d85 --- /dev/null +++ b/navit/support/libc/mkdir.c @@ -0,0 +1,29 @@ +/* + * mkdir.c: mkdir implementation for WinCE. + * + * This file has no copyright assigned and is placed in the Public + * Domain. This file is a part of the mingw32ce package. No + * warranty is given; refer to the file DISCLAIMER within the package. + * + * Written by Pedro Alves <pedro_alves@portugalmail.pt> 24 Jun 2007 + * + */ + +#include <windows.h> +#include <io.h> + +int +_mkdir (const char *dirname) +{ + wchar_t dirnamew[MAX_PATH]; + mbstowcs (dirnamew, dirname, MAX_PATH); + if (!CreateDirectoryW (dirnamew, NULL)) + return -1; + return 0; +} + +int +mkdir (const char *dirname) +{ + return _mkdir (dirname); +} |