From 227909e2cf0039737dc52872651837fe5f1702b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Sep 2010 19:20:07 -0400 Subject: Rejig of some of the socket stuff. Fixed marking sockets as nonblocking on Windows. Added in a LastError function to keep having to use strerror/GetLastError everywhere. --- src/win32/windows.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/win32') diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp index 9ea3dad09..5f0c6d5e4 100644 --- a/src/win32/windows.cpp +++ b/src/win32/windows.cpp @@ -9,19 +9,9 @@ * Based on the original code of Services by Andy Church. */ -#ifdef WIN32 +#ifdef _WIN32 #include "services.h" -const char *dlerror() -{ - static char errbuf[513]; - DWORD err = GetLastError(); - if (!err) - return NULL; - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, errbuf, 512, NULL); - return errbuf; -} - /** This is inet_pton, but it works on Windows * @param af The protocol type, AF_INET or AF_INET6 * @param src The address -- cgit