openMSX
direntp.hh
Go to the documentation of this file.
1#ifndef DIRENTP_HH
2#define DIRENTP_HH
3
4#ifndef _WIN32
5#include <dirent.h>
6#else
7// When building with MinGW, we use our own wrapper instead of the
8// native dirent.h provided by the MinGW C runtime. We do this because
9// we need an implementation of dirent that returns UTF8-encoded strings
10// as chars.
11// Unfortunately, MinGW's implementation of dirent provides either
12// wchar_t-based versions that support UTF16 (when UNICODE is defined),
13// or char-based versions containing what appear to be ANSI strings,
14// certainly not UTF8.
15// While this behavior is relatively consistent with Win32, it's not
16// what we need here. Consequently, we use our wrapper instead.
17#include "win32-dirent.hh"
18#endif
19
20#endif