#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>

#undef CreateDirectory

BOOL WINAPI
CreateDirectory(LPCWSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{
	char *name;
	int r;
	if(win_useunicode)
		return CreateDirectoryW(lpPathName, lpSecurityAttributes);

	name = win_wstr2utf(lpPathName);
	r = CreateDirectoryA(name, lpSecurityAttributes);
	win_free(name);
	return r;
}
