#ifndef _UNICODE


int __cdecl _rmdir (

        const char *path

        )

{

    wchar_t* pathw = NULL;

    int retval;


    if (path)

    {

        if (!__copy_path_to_wide_string(path, &pathw))

            return -1;

    }


    /* call the wide-char variant */

    retval = _wrmdir(pathw);


    _free_crt(pathw); /* _free_crt leaves errno alone if everything completes as expected */


    return retval;

}


#else  /* _UNICODE */


int __cdecl _wrmdir (

        const wchar_t *path

        )

{

        ULONG dosretval;


        /* ask OS to remove directory */


        if (!RemoveDirectoryW(path))

            dosretval = GetLastError();

        else

            dosretval = 0;


        if (dosretval) {

            /* error occured -- map error code and return */

            _dosmaperr(dosretval);

            return -1;

        }


        return 0;

}


#endif  /* _UNICODE */


이럴거면 #ifndef는 왜 있는거죠?

RemoveDirectoryA와 같은 ANSI형 함수는 전부 wchar_t로 변환되어 들어간다는게 맞는 것 같네요