// #include "wx/msw/private.h" which itself includes <windows.h>, as this
// one in turn includes <winsock.h> unless we define WIN32_LEAN_AND_MEAN.
//
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
extern "C" {
#include <winsock.h> // we use socket functions in wxGetFullHostName()
}
#endif
# if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS
-# define new new(__FILE__,__LINE__)
+# define new new(__TFILE__,__LINE__)
# endif
#endif
DWORD nSize = maxSize;
if ( !::GetComputerName(buf, &nSize) )
{
- wxLogLastError("GetComputerName");
+ wxLogLastError(wxT("GetComputerName"));
return FALSE;
}
// get full hostname (with domain name if possible)
bool wxGetFullHostName(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
// TODO should use GetComputerNameEx() when available
WSADATA wsa;
if ( WSAStartup(MAKEWORD(1, 1), &wsa) == 0 )
if ( h == INVALID_HANDLE_VALUE )
{
- wxLogLastError("FindFirstFile");
+ wxLogLastError(wxT("FindFirstFile"));
return FALSE;
}
return TRUE;
}
-#endif // wxUSE_GUI
-
// MSW only: get user-defined resource from the .res file.
// Returns NULL or newly-allocated memory, so use delete[] to clean up.
#endif // Win16/32
}
+#endif // wxUSE_GUI
+
#if 0
//------------------------------------------------------------------------
// wild character routines
return ((*str == '\0') && (*pattern == '\0'));
};
-#endif
+#endif // 0
#if 0