summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-10-11 14:25:09 -0600
committerJens Axboe <axboe@kernel.dk>2017-10-11 14:25:09 -0600
commit4252396ed2acb5807b771edc551098462ddea4f1 (patch)
tree52d743e4d3e2049098fd5496be89b7427ffc7530 /configure
parent645943c03a60a61fc2494480cde1f051f8a14111 (diff)
downloadfio-4252396ed2acb5807b771edc551098462ddea4f1.tar.gz
fio-4252396ed2acb5807b771edc551098462ddea4f1.tar.bz2
Windows mkdir() fix
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index 749cb1fb..2b46ab83 100755
--- a/configure
+++ b/configure
@@ -353,6 +353,7 @@ CYGWIN*)
tls_thread="yes"
static_assert="yes"
ipv6="yes"
+ mkdir_two="no"
echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
;;
esac
@@ -2047,6 +2048,22 @@ if test "$enable_cuda" = "yes" && compile_prog "" "-lcuda" "cuda"; then
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
@@ -2275,6 +2292,9 @@ 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