Use mkdir() instead of _mkdir() for MinGW
MinGW-w64 requires the use of mkdir() and MinGW-w32 appears to support both so use mkdir() to allow compilation to work with both versions.
This commit is contained in:
parent
d8bdea11c5
commit
ed13de131d
|
|
@ -81,9 +81,12 @@ const char NOTICE[] =
|
|||
# include <getopt.h>
|
||||
#endif
|
||||
# include <sys/stat.h>
|
||||
// MinGW only supports mkdir() with a path. If this stops working because
|
||||
// we need to use _mkdir() for mingw-w32 and mkdir() for mingw-w64 look
|
||||
// at using the autoconf AX_FUNC_MKDIR macro to figure this all out.
|
||||
#if defined(__MINGW32__)
|
||||
# include <io.h>
|
||||
# define mkdir(path, mode) _mkdir(path)
|
||||
# define mkdir(path, mode) mkdir(path)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue