configure: solaris and windowsaio fixups
authorJens Axboe <axboe@kernel.dk>
Thu, 24 Jan 2013 22:33:33 +0000 (15:33 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 24 Jan 2013 22:33:33 +0000 (15:33 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
configure
fio.h
options.c
os/os-windows.h

index 84988f8acc933b6783db1a4ff03240929bc5c0b5..dab6e888546f2ced159a7edb2b66d30e3cf15878 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -80,6 +80,10 @@ ifdef CONFIG_SOLARISAIO
   CFLAGS += -DCONFIG_SOLARISAIO
   SOURCE += engines/solarisaio.c
 endif
   CFLAGS += -DCONFIG_SOLARISAIO
   SOURCE += engines/solarisaio.c
 endif
+ifdef CONFIG_WINDOWSAIO
+  CFLAGS += -DCONFIG_WINDOWSAIO
+  SOURCE += engines/windowsaio.c
+endif
 
 ifndef CONFIG_STRSEP
   CFLAGS += -DCONFIG_STRSEP
 
 ifndef CONFIG_STRSEP
   CFLAGS += -DCONFIG_STRSEP
@@ -184,7 +188,7 @@ ifeq ($(UNAME), Darwin)
 endif
 ifneq (,$(findstring CYGWIN,$(UNAME)))
   SOURCE := $(filter-out engines/mmap.c,$(SOURCE))
 endif
 ifneq (,$(findstring CYGWIN,$(UNAME)))
   SOURCE := $(filter-out engines/mmap.c,$(SOURCE))
-  SOURCE += engines/windowsaio.c os/windows/posix.c
+  SOURCE += os/windows/posix.c
   LIBS  += -lpthread -lpsapi -lws2_32
   CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
 endif
   LIBS  += -lpthread -lpsapi -lws2_32
   CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
 endif
index cfd8c8ac0a98d2cdcddaeb6fbd7189464a35255b..3f5037cbb20fe2e0540a9804a76675bd1102eedd 100755 (executable)
--- a/configure
+++ b/configure
@@ -165,6 +165,7 @@ CYGWIN*)
   echo "CONFIG_FADVISE=y"          >> $config_host_mak
   echo "CONFIG_SFAA=y"             >> $config_host_mak
   echo "CONFIG_RUSAGE_THREAD=y"    >> $config_host_mak
   echo "CONFIG_FADVISE=y"          >> $config_host_mak
   echo "CONFIG_SFAA=y"             >> $config_host_mak
   echo "CONFIG_RUSAGE_THREAD=y"    >> $config_host_mak
+  echo "CONFIG_WINDOWSAIO=y"       >> $config_host_mak
   exit 0
 esac
 
   exit 0
 esac
 
diff --git a/fio.h b/fio.h
index 1ff384fdb4d08141a4e681cd507fbc5d7655c528..3a263351774ead3dd95ecf6c5d16f1ea931be805 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -40,7 +40,7 @@ struct thread_data;
 #include "stat.h"
 #include "flow.h"
 
 #include "stat.h"
 #include "flow.h"
 
-#ifdef FIO_HAVE_SOLARISAIO
+#ifdef CONFIG_SOLARISAIO
 #include <sys/asynch.h>
 #endif
 
 #include <sys/asynch.h>
 #endif
 
index 16c7995fa3a32c15c1b23769db39935a25bf304c..1009df34936706ef433714cad12995fce8be37fc 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1282,7 +1282,7 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                            .help = "Solaris native asynchronous IO",
                          },
 #endif
                            .help = "Solaris native asynchronous IO",
                          },
 #endif
-#ifdef FIO_HAVE_WINDOWSAIO
+#ifdef CONFIG_WINDOWSAIO
                          { .ival = "windowsaio",
                            .help = "Windows native asynchronous IO"
                          },
                          { .ival = "windowsaio",
                            .help = "Windows native asynchronous IO"
                          },
index 3a8563744af6fefb1235d9c868af5890e09f419b..64808bb980ad5a9052267d95d7038896b1fa4e65 100644 (file)
@@ -21,7 +21,6 @@
 #define FIO_HAVE_CPU_AFFINITY
 #define FIO_HAVE_CHARDEV_SIZE
 #define FIO_HAVE_FDATASYNC
 #define FIO_HAVE_CPU_AFFINITY
 #define FIO_HAVE_CHARDEV_SIZE
 #define FIO_HAVE_FDATASYNC
-#define FIO_HAVE_WINDOWSAIO
 #define FIO_HAVE_GETTID
 #define FIO_USE_GENERIC_RAND
 
 #define FIO_HAVE_GETTID
 #define FIO_USE_GENERIC_RAND