Add FIO_PREFERRED_CLOCK_SOURCE to allow selection of clock source on a per-platform...
[fio.git] / os / os-windows.h
index db4127b3a2e35eed0fa796eec671e7334ad2f21e..8812cfa2e0d76943d398acc11e5b67787a7d9b50 100644 (file)
@@ -1,10 +1,13 @@
 #ifndef FIO_OS_WINDOWS_H\r
 #define FIO_OS_WINDOWS_H\r
 \r
+#define FIO_OS os_windows\r
+\r
 #include <sys/types.h>\r
 #include <errno.h>\r
 #include <windows.h>\r
 #include <psapi.h>\r
+#include <stdlib.h>\r
 \r
 #include "../smalloc.h"\r
 #include "../file.h"\r
@@ -18,6 +21,9 @@
 #define FIO_HAVE_WINDOWSAIO\r
 #define FIO_HAVE_GETTID\r
 \r
+#define FIO_OS_HAVE_SOCKLEN_T\r
+typedef int fio_socklen_t;\r
+\r
 #define FIO_USE_GENERIC_RAND\r
 \r
 #define OS_MAP_ANON            MAP_ANON\r
 \r
 #define FIO_PREFERRED_ENGINE   "windowsaio"\r
 \r
+#define FIO_LITTLE_ENDIAN\r
+#define fio_swap16(x)  _byteswap_ushort(x)\r
+#define fio_swap32(x)  _byteswap_ulong(x)\r
+#define fio_swap64(x)  _byteswap_uint64(x)\r
+\r
 typedef off_t off64_t;\r
 \r
 typedef struct {\r