Fix Cygwin 1.7 build.

Avoid using Cygwin sockets as our code assumes that we use WinSock API under
Windows currently (this might change in the future) by defining
__USE_W32_SOCKETS.

Use new, safer and more efficient cygwin_conv_path() function.

Use t_str() instead of fn_str() with Windows API taking file names, under
Cygwin they are different and using fn_str() is incorrect.

A few other minor fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-07-23 23:32:46 +00:00
parent 3d4e20dd0b
commit 715e4f7e3e
15 changed files with 67 additions and 28 deletions

View File

@@ -49,7 +49,7 @@
#include <errno.h>
#ifdef __UNIX__
#if defined(__UNIX__) && !defined(__CYGWIN__)
#include <netdb.h>
#include <arpa/inet.h>
#endif // __UNIX__
@@ -82,8 +82,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
#ifdef __WXMSW__
#define HAVE_INET_ADDR
#ifndef HAVE_GETHOSTBYNAME
#define HAVE_GETHOSTBYNAME
#endif
#ifndef HAVE_GETSERVBYNAME
#define HAVE_GETSERVBYNAME
#endif
// under MSW getxxxbyname() functions are MT-safe (but not reentrant) so
// we don't need to serialize calls to them