* hb_stat ************************************************************************ * Wrapper to the real stat, needed to handle utf8 filenames on * windows. ***********************************************************************/
| 810 | * windows. |
| 811 | ***********************************************************************/ |
| 812 | int hb_stat(const char *path, hb_stat_t *sb) |
| 813 | { |
| 814 | #ifdef SYS_MINGW |
| 815 | wchar_t path_utf16[MAX_PATH]; |
| 816 | if (!MultiByteToWideChar(CP_UTF8, 0, path, -1, path_utf16, MAX_PATH)) |
| 817 | return -1; |
| 818 | return _wstat64( path_utf16, sb ); |
| 819 | #else |
| 820 | return stat(path, sb); |
| 821 | #endif |
| 822 | } |
| 823 | |
| 824 | /************************************************************************ |
| 825 | * hb_fopen |
no test coverage detected