Imported Upstream version 1.2.0
[deb_libnfs.git] / win32 / win32_errnowrapper.h
diff --git a/win32/win32_errnowrapper.h b/win32/win32_errnowrapper.h
new file mode 100644 (file)
index 0000000..4477d3f
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef WIN32_ERRNOWRAPPER_H_
+#define WIN32_ERRNOWRAPPER_H_
+
+#undef errno
+#define errno WSAGetLastError()
+#undef EAGAIN
+#undef EWOULDBLOCK
+#undef EINTR
+#undef EINPROGRESS
+
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EAGAIN         WSAEWOULDBLOCK                                  //same on windows
+#define EINTR       WSAEINTR
+#define EINPROGRESS WSAEINPROGRESS
+#endif //WIN32_ERRNOWRAPPER_H_