]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckaddr.cpp
Merge of SOC2010_RTC_IMAGES branch.
[wxWidgets.git] / src / common / sckaddr.cpp
index 5f2797cf5cdf966900d74502c70edd6bf959db34..67ca3fbcdfa77af4a5a368ad4eb55a98f3d90bac 100644 (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
@@ -874,7 +878,7 @@ wxString wxIPV4address::IPAddress() const
 
     return wxString::Format
            (
-            "%lu.%lu.%lu.%lu",
+            "%u.%u.%u.%u",
             (addr >> 24) & 0xff,
             (addr >> 16) & 0xff,
             (addr >> 8) & 0xff,