Apparently mingw mkdir() only takes the path as an argument,
it doesn't include a permission mode...
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tls_thread="yes"
static_assert="yes"
ipv6="yes"
tls_thread="yes"
static_assert="yes"
ipv6="yes"
echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
;;
esac
echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
;;
esac
fi
print_config "cuda" "$cuda"
fi
print_config "cuda" "$cuda"
+##########################################
+# mkdir() probe. mingw apparently has a one-argument mkdir :/
+mkdir_two="no"
+cat > $TMPC << EOF
+#include <sys/stat.h>
+#include <sys/types.h>
+int main(int argc, char **argv)
+{
+ return mkdir("/tmp/bla", 0600);
+}
+EOF
+if compile_prog "" "" "mkdir(a, b)"; then
+ mkdir_two="yes"
+fi
+print_config "mkdir(a, b)" "$mkdir_two"
+
#############################################################################
if test "$wordsize" = "64" ; then
#############################################################################
if test "$wordsize" = "64" ; then
if test "$cuda" = "yes" ; then
output_sym "CONFIG_CUDA"
fi
if test "$cuda" = "yes" ; then
output_sym "CONFIG_CUDA"
fi
+if test "$mkdir_two" = "yes" ; then
+ output_sym "CONFIG_HAVE_MKDIR_TWO"
+fi
echo "LIBS+=$LIBS" >> $config_host_mak
echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak
echo "LIBS+=$LIBS" >> $config_host_mak
echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak
break;
*end = '\0';
errno = 0;
break;
*end = '\0';
errno = 0;
+#ifdef CONFIG_HAVE_MKDIR_TWO
if (mkdir(path, 0600) && errno != EEXIST) {
if (mkdir(path, 0600) && errno != EEXIST) {
+#else
+ if (mkdir(path) && errno != EEXIST) {
+#endif
log_err("fio: failed to create dir (%s): %d\n",
start, errno);
return 1;
log_err("fio: failed to create dir (%s): %d\n",
start, errno);
return 1;