From: Ryan Norton Date: Sun, 10 Apr 2005 06:33:26 +0000 (+0000) Subject: Fixes & Hacks to make sockets compile on CYGWIN with windows enabled X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9e07d399198ef5a2c2773dbaf8a1ad6b95952c5e Fixes & Hacks to make sockets compile on CYGWIN with windows enabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 23155b313e..dd50006e2d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -20,8 +20,6 @@ #include "wx/platform.h" -/* RN - only double-check the environment when building in C++ - Shouldn't configure pass the environment to all sub-libs too? */ #ifdef __cplusplus /* Make sure the environment is set correctly */ # if defined(__WXMSW__) && defined(__X__) @@ -2248,6 +2246,15 @@ enum wxUpdateUI # define wxALL_FILES gettext_noop("All files (*)|*") #endif +# if wxUSE_STL || defined(wxUSE_STD_STRING) + //NASTY HACK because the gethostname in sys/unistd.h which the gnu stl includes + //and wx builds with by default clash with each other (windows version + //2nd param is int, sys/unistd.h version is unsigned int). +# define gethostname gethostnameHACK +# include +# undef gethostname +# endif + /* --------------------------------------------------------------------------- */ /* macros that enable wxWidgets apps to be compiled in absence of the */ /* sytem headers, although some platform specific types are used in the */ diff --git a/include/wx/msw/gsockmsw.h b/include/wx/msw/gsockmsw.h index 346a23c4c1..60573eeda0 100644 --- a/include/wx/msw/gsockmsw.h +++ b/include/wx/msw/gsockmsw.h @@ -23,7 +23,13 @@ #include "wx/msw/wrapwin.h" -#if defined(__WXWINCE__) +#if defined(__CYGWIN__) + //CYGWIN gives annoying warning about runtime stuff if we don't do this +# define USE_SYS_TYPES_FD_SET +# include +#endif + +#if defined(__WXWINCE__) || defined(__CYGWIN__) #include #endif diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index 4f71207fd3..b0bc278ffe 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -160,7 +160,7 @@ public: #endif // wxUSE_IPV6 -#if defined(__UNIX__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) +#if defined(__UNIX__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) && !defined(__CYGWIN__) #include #ifndef __VMS__ # include